It looks like the my does not reset the variable value to undef if it is initialized through a test.
Those 2 snippets are not equivalent either:
foreach (1..2) { my $i; print "$i\n"; $i++; }Now is this a bug or a feature?
In reply to Re: lexical weirdness(?)
by mirod
in thread lexical weirdness(?)
by jimt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |