Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: foreach doesn't select array element

by december (Pilgrim)
on May 04, 2009 at 13:36 UTC ( #761722=note: print w/replies, xml ) Need Help??


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 (Bishop) on May 05, 2009 at 15:19 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://761722]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-01-18 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (54 votes). Check out past polls.

    Notices?