http://qs321.pair.com?node_id=93571


in reply to Can't quit my until loop

You can also use what's called a naked block, to do what you want:

#!/usr/bin/perl -w use strict ; use LWP::Simple qw(getprint); use constant NIST_SERVER => 'http://132.163.4.101:13'; print <<HERE; This will get the time from an NIST clock 5 times and then ask you if you want to continue. Use 'y' to continue and any other key to stop: HERE { getprint(NIST_SERVER) for 1..5; print 'Do you want to continue? [yn]: '; chomp(my $answer = <STDIN>); redo if lc($answer) eq 'y'; } print "Good-bye!\n\n";