I don't really understand Perl, so I was wondering if someone could give me a hint about what it is this code is asking of STDIN, and how to say this in C#. Thanks.
$TMPFILE = "xxx.tmp";
if (! -f STDIN) {
open TMPFILE, "> $TMPFILE"
or die "Couldn't open `$TMPFILE' for writing: $!; aborting";
print TMPFILE while <STDIN>;
close TMPFILE;
open STDIN, "< $TMPFILE"
or die "Couldn't open `$TMPFILE' for reading: $!; aborting";
unlink $TMPFILE;
}