According to Jon Jacob: > > { > print "Enter number to add up (999 to quit): "; > chomp($a = <STDIN>); > last if $a eq "999"; > $b += $a; > redo; > } That should be: last if $a == 999; if you want to test it numerically. Otherwise, if a hidden character gets into the $a variable it may not stop when you think it's supposed to stop. But when I ran this several times it worked fine for me. ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch