# I am trying to duplicate the STDIN as follows: # Why is it that the filehandle FH is empty? # How do I solve this? # The script is invoked as follows: # script_name.pl <input_file # I can't see anymore...I've got blisters on my fingers. open(FH,"<&STDIN") || die "Error with copying STDIN to FH : $!\n"; while ($inbuf=<STDIN>) { print $inbuf; } while (<FH>) { print $_; } close(FH) || die "Error closing FH: $!\n"; exit;
In reply to Duplicating STDIN by Leipzig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |