#!/usr/bin/perl -w use strict ; use diagnostics; use LWP::Simple ; print "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:\n\n" ; 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 "\n\nDo you want to continue? " ; $answer = ; chomp $answer ; if ($answer eq 'y') { print "OK\n" ; } else { $quit = 1 ; } } print "Good-bye!\n\n" ;