use warnings; use strict; use Data::Dumper; my @arr = qw( a b c ); my %h; @h{@arr} = (3, 4, 5); # @hash{keys} = values print Dumper(\%h); __END__ Output: $VAR1 = { 'c' => 5, 'b' => 4, 'a' => 3 };
In reply to Re: Using a hash with the @ sigil
by choroba
in thread Using a hash with the @ sigil
by 1nickt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |