$_ = 'Ovid'; %hash = map { $_ => 1 } qw/ foo bar baz /; print; #### $_ = 'Ovid'; %hash = map { $_ .= 'asdf'; $_ => 1 } qw/ foo bar baz /; print; #### $_ = 'Ovid'; %hash = map { local $_ = $_; $_ .= 'asdf'; $_ => 1 } qw/ foo bar baz /; print;