my $x; for ($x=1.0; $x <= 3.0; $x += 0.2) { print "$x\n"; } print "Stop: x=$x\n"; print "No, x is not 3.\n" if $x != 3.0;