-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
I don't see a motivating testcase, and the description is bogus.
perl -e'$_="x";%h=map{$_=>1}(0..3);print $_' => x # global $_ is restored
perl -e'sub x{$_="ouch"};$_="x";%h=map{$_=>x}(0..9);print $_' => x # global $_ is restored
Do you just need a map with a lexical iteration variable other than $_?
$_ is properly restored.
Something like map sub($i){$i => 1} @array for nested maps?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels