in reply to Capturing input from pipe?
#!/usr/local/bin/perl -w use strict; while (<STDIN>) { print "$. $_" }
But almost any program is more useful if it can read either STDIN or filenames supplied on the command line. So reading <> almost always makes more sense.
|
|---|