in reply to Re: Re: Reading from STDIN
in thread Reading from STDIN
<> will not read from STDIN if there are arguments; not even when it runs out of files. Proof:
$ echo "one" > file1; echo "two" > file2 $ echo "three" | perl -e 'print while <>' file1 file2 one two
This script requires at least one argument to work so I assume that unless @ARGV is cleared, <> will never read from STDIN.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Reading from STDIN
by jweed (Chaplain) on Nov 28, 2003 at 19:33 UTC |