Ever wondered how to quickly convert an array to a hash on the fly? Well here's one way to do it:
my %h = map { $_ => 1 } qw/one two three four/;
Feel free to come up with other perhaps more efficient and/or elegant and/or cryptic ways of doing this.



my %h; @h{qw/one two three four/} = undef;my %h = map { $_ => 1 } qw/one two three four/; # 47 charactersmy %h; @h{qw/one two three four/} = undef; # 44 charactersYou win by a nose!