So a script I wrote long ago has stopped working somewhere between perl 5.x and 5.22.
myscript.pl
#!/usr/bin/perl
use strict;
while (<>) {
# do stuff with each argument given and spit out a sting.
# this example I'll just do
print;
}
Now when I run it
$> ./myscript.pl foo bar baz
Can't open foo: No such file or directory at ./sp2comma.pl line 13.
Can't open bar: No such file or directory at ./sp2comma.pl line 13.
Can't open baz: No such file or directory at ./sp2comma.pl line 13.
The expected result is of course
$> ./myscript.pl foo bar baz
foobarbaz
Has something happened? Why is while (<>) not doing what it use to? How do I get the old behavior?
Thanks in advance.