Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: each function

by RonW (Parson)
on Jun 03, 2014 at 23:08 UTC ( [id://1088537]=note: print w/replies, xml ) Need Help??


in reply to Re: each function
in thread each function

Elaborating: each returns a key/value pair, so you need to:

while (my ($k,$v) = each %hash)

Though in a scalar context, each returns just the key, but I think keys is more readable:

for (keys %hash)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-28 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found