use strict; use warnings; use Data::Dumper; my %hash; @hash{qw(a b c)} = (1) x 3; print Dumper (\%hash); #### $VAR1 = { 'c' => 1, 'a' => 1, 'b' => 1 };