use Syntax::Construct qw{ %slice }; use Data::Dumper; my @l = qw( the quick brown fox ); my %h = %l[0 .. $#l]; print Dumper \%h; __END__ $VAR1 = { '2' => 'brown', '1' => 'quick', '3' => 'fox', '0' => 'the' };
In reply to Re: converting an array to an hash
by choroba
in thread converting an array to an hash
by savio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |