Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

(dkubb) Re: (2) Can't quit my until loop

by dkubb (Deacon)
on Jul 03, 2001 at 20:29 UTC ( #93571=note: print w/replies, xml ) Need Help??


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";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://93571]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-12-09 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?