my @array = qw /a b c/; my %hash = map {$_ => 1} @array; return \%hash;
can that be done with a map and a hashref rather than having to return a hashref? ripped off from tadman in Re: an easier way with grep, map, and/or sort?.
--au
In reply to Re: Re: Array to hash refs
by aufrank
in thread Array to hash refs
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |