![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
This is well spotted! If I modify my example to include this extra <>:
then only perl stdin.pl stdin.plwaits for more input, while the other two versions finished immediately. That is still strange... UPDATE: I guess Perl will do unshift(@ARGV, '-') unless @ARGV; (copied from LanX above) and "re-open" STDIN because @ARGV was exhausted in the while loop already. When using pipes or redirections this logic will not be applied and <> will only return EOF or similar. In reply to Re^2: <> oddity ?
by hdb
|
|