![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: foreach doesn't select array elementby december (Pilgrim) |
on May 04, 2009 at 13:31 UTC ( #761721=note: print w/replies, xml ) | Need Help?? |
But shouldn't the foreach() have selected the first array element? If I have a simple array (anna, beth, christie, denise) and pass this @array to foreach, it returns the values. Well, @$fildref3 is a simple array, so when I pass it to foreach(), I expect it to return the members of this array, which is either an array of scalar pairs or the refs to these (in code example 2).
I fail to understand why this doesn't work (simulated dump output):
This is what I try to do. Dump doesn't show:
(Note the ref marker in front of the girl array.) If I understand correctly, the @{} is needed to deref the array ref. But Dump shows me it's an ordinary array, like in my first simple array example in this post. Thanks for helping out...
In Section
Seekers of Perl Wisdom
|
|