% cat myfile.txt | myprogram.pl #### % myprogram.pl < myfile.txt #### #!/usr/bin/perl -w use strict; my $stream; while (<>) { $stream .= $_; } print "Do you want to process the stream?"; my $ans = ; #... exit;
## % myprogram.pl < myfile.txt ##
## #!/usr/bin/perl -w use strict; my $stream; while (<>) { $stream .= $_; } print "Do you want to process the stream?"; my $ans = ; #... exit;