in reply to <> oddity ?
reads from STDIN. Try this script:
This should behave similar to yours under your 3 scenarios.
$ ./weird.pl sample.txt
$ ./weird.pl <sample.txt
$ cat sample.txt | ./weird.pl
Yes, I watch meteor showers
No, I do not watch meteor showers
My meteors prefer to bathe
Results (194 votes). Check out past polls.