Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: How to create loop in perl dynamically

by sundialsvc4 (Abbot)
on Sep 26, 2012 at 15:52 UTC ( #995802=note: print w/ replies, xml ) Need Help??


in reply to Re^3: How to create loop in perl dynamically
in thread How to create loop in perl dynamically

foreach my $foo (1 .. $x) ... creates a local variable named $foo which contains the current index for this particular loop.   Never use $_ for this purpose, usually.


Comment on Re^4: How to create loop in perl dynamically

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2015-07-05 06:07 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 (60 votes), past polls