#!/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.
In reply to Re: Capturing input from pipe?
by ariels
in thread Capturing input from pipe?
by lowlife
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |