Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 romping around the Monastery: (14)
As of 2015-07-31 13:05 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 (277 votes), past polls