NOTE: The behaviour of a my statement modified with a statement modifier conditional or loop construct (e.g. my $x if ... ) is undefined. The value of the my variable may be undef, any previously assigned value, or possibly anything else. Don't rely on it. Future versions of perl might do something different from the version of perl you try it out on. Here be dragons.I thought this "feature" had been removed in the upcoming 5.10 release of perl, but I can't find any reference to it now :(
update
Gah! I was reading perl595delta instead of perl5100delta:
New or Changed Diagnostics...
Deprecated use of my() in false conditional
A new deprecation warning, Deprecated use of my() in false conditional, has been added, to warn against the use of the dubious and deprecated constructmy $x if 0;
See perldiag. Use state variables instead.
In reply to Re: Unforgettable Closures?
by FunkyMonk
in thread Unforgettable Closures?
by faiz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |