in reply to Re^2: Reassigning $_ in loop doesn't stick
in thread Reassigning $_ in loop doesn't stick
Update: Confirmed with 5.10.0 that map aliases not copies
I am guessing I am not understanding what you are saying.
#!/usr/bin/perl use strict; use warnings; my @foo = 'a' .. 'd'; map { $_ = uc($_) } @foo; # look Mom, map in a void context print "@foo\n";
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Reassigning $_ in loop doesn't stick
by kyle (Abbot) on Jan 21, 2009 at 21:31 UTC | |
|
Re^4: Reassigning $_ in loop doesn't stick
by ikegami (Patriarch) on Jan 21, 2009 at 21:33 UTC | |
by Limbic~Region (Chancellor) on Jan 21, 2009 at 23:58 UTC | |
by ikegami (Patriarch) on Jan 22, 2009 at 05:19 UTC |