Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Initializing a hash can be done with an array, each pair of values in the array form key and value of the hash. Often '=>' is used as an alias to ',' to make this obvious:
{$names{$_}} on the other hand is not a really useful expression in perl, %{$names{$_}} refers to a hash whose reference is stored as value in another hash (i.e %names). A multidimensional hash or HashOfHashes in perlspeak If what you wanted was a Hash of Hashes, the syntax looks like this:
if you want further information about HoH (Hash of Hashes), you might want to read perldsc and perllol In reply to Re^3: Spliting a delimited string into variables
by jethro
|
|