http://qs1969.pair.com?node_id=1175907


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