New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
my-variable does not go out of scope #8281
Comments
From fany@noris.netCreated by fany@noris.netThis is a bug report for perl from fany@noris.net, ----------------------------------------------------------------- $ perl -Mstrict -le 'for (1..3) { { my $foo if 0; $foo .= $_; print $foo } }' I would expect $foo to go out of scope at the end of the block BTW, the same behaviour can be reproduced using arrays of hashes. If this is a feature, please explain it to me! Regards, Perl Info
|
From @smpeters
The "my $foo if 0" construct can be used to create something similar to
|
The RT System itself - Status changed from 'new' to 'open' |
@smpeters - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#38224 (status was 'resolved')
Searchable as RT38224$
The text was updated successfully, but these errors were encountered: