in reply to How a for() assignment works
Wow, you caused me to have quite the headslap moment. At first I was thinking, why does the lc get assigned to a new variable? So I played around with it and realized for the first time that $var in this construct is an alias and not a copy. *headslap*
Could you not, at least in this example, use a map? Like, map { print ("Value: " . $hash{lc($_)}); } @valuesIs it uncouth to use map this way?
Edit: Destroyed by better and faster answers!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How a for() assignment works
by NetWallah (Canon) on Mar 06, 2008 at 21:36 UTC | |
by Argel (Prior) on Mar 07, 2008 at 20:27 UTC | |
by NetWallah (Canon) on Mar 08, 2008 at 01:09 UTC | |
by Argel (Prior) on Mar 08, 2008 at 01:42 UTC |