Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2017-07-20 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (316 votes). Check out past polls.