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.
|
|---|