in reply to How to accept ARG from PIPE or STDIN?
Your second example is not reading from STDIN, by the way. You probably meant this:@lines = <>;
$ perl thiscode.pl < SOMEFILE.txt
Update: Your first example, using the pipe, is reading from STDIN.. but the magic diamond <> works for both named arguments (files listed) and STDIN.
|
|---|