my $i = 1.0; my $lasti; for (;;) { $lasti = $i; $i *= 2; print $i,"\n"; last if ($i == $lasti); }