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

Re: Iterating over verbatim hash reference

by BrowserUk (Patriarch)
on Jan 22, 2010 at 00:24 UTC ( [id://818848]=note: print w/replies, xml ) Need Help??


in reply to Iterating over verbatim hash reference

You can't avoid a name, but (with 5.10) you can limit it's scope:

while( my ($k, $v) = each %{ state $a = { 'a'..'z' } } ) { say "$k :> +$v" };; w :> x e :> f a :> b m :> n s :> t y :> z u :> v c :> d k :> l q :> r g :> h i :> j o :> p

Not that I can see any justification for doing so.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://818848]
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-04-24 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found