Problems? Is your data what you think it is? | |
PerlMonks |
%+ and scopeby oha (Friar) |
on Jan 04, 2013 at 10:10 UTC ( [id://1011596]=perlquestion: print w/replies, xml ) | Need Help?? |
oha has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I found a strange behavior while trying to return values from %+:
I was expecting to get the same result, but apparently the list become empty when exiting the scope. adding a map (return map { $_ } @+{qw(a)}) fix the issue, and it does not show by just returning $+{a}. Am i missing something or there's something wrong? TIA update: see Bizarro %+ hash slice bug in Perl 5.10 to 5.14.
Back to
Seekers of Perl Wisdom
|
|