http://qs321.pair.com?node_id=761722


in reply to Re^3: foreach doesn't select array element
in thread foreach doesn't select array element

But why does Dump show "a", "b", "c", "d" and not \"a", "b", "c", "d"? It seems to show an ordinary array. You don't need to dereference anything in the following basic array:

[ "anna", "beth", "christie", "denise", ] foreach my $girl (@arr) { print "$girl\n"; }

... and if it's a ref to an array instead of an array itself, shouldn't Dump show \... in my original post? It looks as if it's an ordinary by-value array because there's no slash in front of it to point out it's a reference.

Thanks!

Replies are listed 'Best First'.
Re^5: foreach doesn't select array element
by AnomalousMonk (Archbishop) on May 05, 2009 at 15:19 UTC