my %inp = ( KEY1 => 'VALUE1', KEY2 => { 'VALUE 21', 'VALUE 22', 'VALUE 23' } )
Note that hashes hold key-value pairs, i.e. the above structure would be more like
my %inp = ( KEY1 => 'VALUE1', KEY2 => { 'VALUE 21' => 'VALUE 22', 'VALUE 23' => undef } )
Not sure if that's what you want. Maybe you rather want an array(ref) (i.e. KEY2 => [ ... ]) here?
In reply to Re: Initialize an hash with string
by Eliya
in thread Initialize an hash with string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |