use Ensure; use strict; my ($x,$limit) = (0,100); ensure { $x < $limit } using($x), looping { print "Enter P,Q,R: "; chomp(my $numbers = ); my ($p,$q,$r) = split /,/, $numbers; $x += $p; $x *= $q; $x /= $r; }; print "Finally stopped at $x.\n";