Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: while loops with two tests not working.

by nedals (Deacon)
on Jul 20, 2007 at 00:52 UTC ( [id://627690]=note: print w/replies, xml ) Need Help??


in reply to Re^2: while loops with two tests not working.
in thread while loops with two tests not working.

Get into the habit of using strict.
If $i=0, you will never enter the loop which requires $i > 0
Change to $i >= 0
my $average = 3; my $i = 0; while ($i >= 0 and $i <= $average) { print qq~<img src=".... /> ~; $i++ }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-23 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found