Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: for loops

by amarceluk (Beadle)
on May 25, 2002 at 16:54 UTC ( [id://169281]=note: print w/replies, xml ) Need Help??


in reply to Re: for loops
in thread for loops

$i++ is the equivalent of
$i=$i+1;
where the = is an operator. It's not just sitting there, like it does in math, saying "these two things are equal"; it tells Perl to make the two things equal. So here it's saying "take the current value of $i and add 1, and make that the new value of $i." Then the for loop continues with the new value of $i. This happens each time the loop runs, until $i reaches 100.

_________
"Abby-somebody. Abby-normal."
Young Frankenstein

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2024-04-18 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found