in reply to Re^2: Closure warning with Perl 5.14?
in thread Closure warning with Perl 5.14?
But shouldn't there be a warning in 5.12?
Perhaps this is a new warning for old problem added in 5.14 to help us.
I don't get a warning from this in 5.14.0: ...
No. There is no closure involved there.
Try:
use warnings; use strict; my $x = <>; my $y = "X" if $x =~ /X/; sub x{ print $y ? 'Okay' : 'bad'; } print "$y\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Closure warning with Perl 5.14?
by BerntB (Deacon) on May 19, 2011 at 08:56 UTC | |
by BrowserUk (Patriarch) on May 19, 2011 at 09:03 UTC |