$ perl -Mstrict -MData::Dumper -we 'my @a = qw(a b c d); \ my %h = map { $_++ } @a; print Dumper \%h' $VAR1 = { 'c' => 'd', 'a' => 'b' };