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

Re^2: Dereference string in foreach

by 7stud (Deacon)
on Feb 13, 2013 at 23:01 UTC ( #1018653=note: print w/replies, xml ) Need Help??


in reply to Re: Dereference string in foreach
in thread Dereference string in foreach

Here is the effect when perl localizes a variable:

#Whoops.  An Anonymous Monk already posted a good example.

And because a for loop aliases each element in the array to the loop variable, changes to the loop variable change the elements of the array.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018653]
help
Chatterbox?
[LanX]: yep
[erix]: or Ctrl-U to view current html :P
[LanX]: name not id
[LanX]: id isn't approved AFAIK
[LanX]: name works
erix feels silly for having actually tested that contiguous values make no difference in CLUSTERing a table (At least, in postges)
[LanX]: Perl Monks Approved HTML tags
[LanX]: erix and his postguess ...
[erix]: (Grrres...)
[dabella12]: I have a problem install tK on CeontOs using perl 5.24

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2017-06-24 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (557 votes). Check out past polls.