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
returning @+ out of scope loses its value #7192
Comments
From perl-5.8.0@ton.iguana.beCreated by perl-5.8.0@ton.iguana.beThis was already mentioned on the mailinglist, see perl -wle 'sub f {"ab" =~ /(.)/; print "@+"; return @+}; print f' Ok, I can sort of see what's going on here. the scope with the regex But why didn't I get copies of the values, no longer sensitive to If I try to sort of do this (as much as possible) with a normal array, perl -wle 'sub DESTROY { $a[0]=1} @a="a".."c"; sub f { my $a=bless[]; return @a } print f' (I was sort of starting to expect 1bc here) Also notice that things like this DO work, even though $1 is also going Perl Info
|
From @rgsPerl-5.8.0@Ton.Iguana.Be wrote in perl.perl5.porters :
I committed Hugo's proposed fix for this, along with a test case, |
The RT System itself - Status changed from 'new' to 'open' |
@rgs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#27839 (status was 'resolved')
Searchable as RT27839$
The text was updated successfully, but these errors were encountered: