![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re^3: foreach doesn't select array elementby Marshall (Canon) |
on May 04, 2009 at 10:08 UTC ( #761688=note: print w/replies, xml ) | Need Help?? |
Shouldn't foreach (@$fldref3) {} automatically use the referenced array or spit out a warning about passing a single ref? I didn't read your code in detail, but when de-referencing a subscript'ed thing, you need to use {} to show "@" what it is operating upon, eg.. @{$fldref[3]}. If $fldref is just a single ref, then @$fldref works. But this doesn't work if $fldref has a subscript.
In Section
Seekers of Perl Wisdom
|
|