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.
"I'd rather go naked than blow up my ass"