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++ }