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";
In reply to (dkubb) Re: (2) Can't quit my until loop
by dkubb
in thread Can't quit my until loop
by ellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |