Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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?
NodeReaper reads the Necronomicon

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2017-11-20 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (286 votes). Check out past polls.

    Notices?