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


in reply to Re^2: map problem
in thread map problem

I like a modification of your middle suggestion best:

my %y = map { "prefix_".$_ => 1 } qw(a b c);
There's no need to put $_ inside quotes, only to have Perl do variable interpolation on that string. :)

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds