Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
"be consistent"
 
PerlMonks  

Re: Basic list manipulation, and a bit of map() confusion...

by Prof Vince (Friar)
on Feb 24, 2008 at 20:19 UTC ( #669868=note: print w/ replies, xml ) Need Help??


in reply to Basic list manipulation, and a bit of map() confusion...

I'm not sure if you're aware of it, but your code modifies @a since $_ in map and for aliases the current list element. If you don't want this, you'd have to localize $_ or to copy the current element to a new lexical variable.


Comment on Re: Basic list manipulation, and a bit of map() confusion...
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://669868]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-04-20 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls