Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: for loops

by apotheon (Deacon)
on Oct 11, 2004 at 01:02 UTC ( #398066=note: print w/replies, xml ) Need Help??


in reply to Re: for loops
in thread for loops

On second and following iterations, the for loop ignores the initial assignment of value to $i and uses the incremented value (or decremented, if you use a decrement operator instead of an increment operator) instead. The $i=1 assignment happens once, and once only, in for($i=1; $i<=100; $i++).

- apotheon
CopyWrite Chad Perrin

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2020-06-07 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (42 votes). Check out past polls.

    Notices?