in reply to Making a hash with lists

my @keys = qw/a b c/; my @values = qw/foo bar baz/; my %h; @h{ @keys } = @values; ## or . . . @h{ qw/ a b c/ } = qw/foo bar baz/;

The only klunky thing is that you can't initialize a slice and declare the hash with my in one swell foop; gotta do it as two separate statements. See perldata for more on hash slices.

The cake is a lie.
The cake is a lie.
The cake is a lie.