skitchy has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; my $done = 0; my $choice; while (! $done) { print "Test\n"; chomp ( $choice = uc (<>)); $done = 1 if ( $choice eq "Q" ) }
Retitled by davido.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I loop until keyboard input?
by dragonchild (Archbishop) on Dec 15, 2004 at 15:01 UTC | |
by gellyfish (Monsignor) on Dec 15, 2004 at 15:04 UTC | |
|
Re: How do I loop until keyboard input?
by gellyfish (Monsignor) on Dec 15, 2004 at 15:02 UTC | |
by skitchy (Initiate) on Dec 15, 2004 at 15:25 UTC | |
by gellyfish (Monsignor) on Dec 15, 2004 at 15:31 UTC | |
by skitchy (Initiate) on Dec 15, 2004 at 15:35 UTC | |
|
Re: How do I loop until keyboard input?
by Roy Johnson (Monsignor) on Dec 15, 2004 at 15:47 UTC |