in reply to
while(<>) in perl 5.22
I reproduce your undesired behavior on 5.16. To get your desired output in this instance, replace
while (<>)
with
for (@ARGV)
See also
perlop
Comment on
Re: while(<>) in perl 5.22
Select
or
Download
Code
In Section
Seekers of Perl Wisdom