http://www.perlmonks.org?node_id=954828


in reply to Re^3: Using Number Ranges in a Dispatch Table
in thread Using Number Ranges in a Dispatch Table

If we're being nitpicky :) no need to create a lexical block for map:
$ perl -Mstrict -MData::Dumper -we'my%h=( (map +($_=>2), "B","C","D"), + one=>1 ); print Dumper(\%h)' $VAR1 = { 'one' => 1, 'D' => 2, 'C' => 2, 'B' => 2 };