Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: scoping inside the loop

by LanX (Canon)
on May 17, 2013 at 18:40 UTC ( #1034007=note: print w/ replies, xml ) Need Help??


in reply to Re^2: scoping inside the loop
in thread scoping inside the loop

No, up to the point that you declare an inner $i with my the outer one is used.

No inner my $i means the outer one is everywhere available.

These are universal rules for lexical variables in almost any language!

Have a look at the scoping-article I linked.

Cheers Rolf

( addicted to the Perl Programming Language)


Comment on Re^3: scoping inside the loop
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2015-07-28 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls