How 'bout:
my %hash = map {split /:/} @array;
You can construct hashes from lists; for example, explicit hash construction (key => val) just makes a list from a hash (the => operator is a glorified comma).
--In reply to Re: Using map to split an array to hash key/values
by FoxtrotUniform
in thread Using map to split an array to hash key/values
by jlongino
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |