xorl has asked for the wisdom of the Perl Monks concerning the following question:
So a script I wrote long ago has stopped working somewhere between perl 5.x and 5.22.
myscript.pl
myscript.pl
Now when I run it#!/usr/bin/perl use strict; while (<>) { # do stuff with each argument given and spit out a sting. # this example I'll just do print; }
The expected result is of course$> ./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.
Has something happened? Why is while (<>) not doing what it use to? How do I get the old behavior? Thanks in advance.$> ./myscript.pl foo bar baz foobarbaz
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: while(<>) in perl 5.22
by toolic (Bishop) on Nov 14, 2016 at 19:54 UTC | |
Re: while(<>) in perl 5.22
by dsheroh (Monsignor) on Nov 15, 2016 at 08:33 UTC | |
by haukex (Archbishop) on Nov 15, 2016 at 09:18 UTC | |
Re: while(<>) in perl 5.22
by choroba (Cardinal) on Nov 14, 2016 at 21:46 UTC | |
by BillKSmith (Monsignor) on Nov 14, 2016 at 23:04 UTC | |
by choroba (Cardinal) on Nov 14, 2016 at 23:25 UTC |
Back to
Seekers of Perl Wisdom