in reply to Why does an array "dissolve" into a hash?
It's only a list assignment.
The right hand side is just a list, and arrays are flattened to lists.
And the => is not a key-value separator, but just a "fat comma" which auto quotes the LHS.
That's why stuff like
%h = ( %a , %b )
or
%h = ( "foo", 100 , "bar" , 333) #²
(or both)
work.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
²) added example with comma instead of =>
|
|---|