while(<>)
reads from STDIN. Try this script:
while(<>) { print; }
This should behave similar to yours under your 3 scenarios.
$ ./weird.pl sample.txt whereas $ ./weird.pl <sample.txt or $ cat sample.txt | ./weird.pl
In reply to Re: <> oddity ?
by hdb
in thread <> oddity ?
by Krambambuli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |