| ||||||
| 5/17 |
| 2001/1/18-19 [Computer/SW/Languages/Perl] UID:20367 Activity:low |
1/19 How do I read from an input pipe in sh or perl? I need a little
script that can read in "echo foo | myScript"
\_ you use 'read' in sh, and <> in perl. i.e
while (<>) print $_; is perl equivalent to /bin/cat
\_ In perl: explicit is <STDIN>; magical is <>
\_ In csh: accessing $< gives you a line from stdin |