Probably you see it yourself if I modify the layout of your code:
You are never altering $quit in the loop ... so it can't terminate ;-)my $answer ; my $quit = 0 ; until ($quit) { getprint("http://132.163.4.101:13") ; getprint("http://132.163.4.101:13") ; getprint("http://132.163.4.101:13") ; getprint("http://132.163.4.101:13") ; getprint("http://132.163.4.101:13") ; print "Do you want to continue? " ; $answer = <STDIN> ; chomp $answer ; } if ($answer ne 'y') { print "OK\n" ; } else { $quit = 1 ; die "OK!\n\n" ; } print "Good-bye!\n\n" ;
-- Hofmator
In reply to Re: Can't quit my until loop
by Hofmator
in thread Can't quit my until loop
by ellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |