Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 meditating upon the Monastery: (10)
As of 2014-10-22 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (114 votes), past polls