Map evaluates in array context, and if the block in the map clause returns an array (like split does), the elements will be interpolated. This then gets interpreted as a hash. Best of luck.... -Jonathanmy @array = qw(key1:value1 key2:value2 key3:value3); my %hash = map {split ":"} @array; # .. etc ..
In reply to Re: Using map to split an array to hash key/values
by jsegal
in thread Using map to split an array to hash key/values
by jlongino
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |