Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 browsing the Monastery: (7)
As of 2014-09-18 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (109 votes), past polls