in reply to Re^7: Is there a way to halt the program until an enter is pressed?
in thread Is there a way to halt the program until an enter is pressed?
If I do a test script,the script looks fine,it waits after the print statement,confused :-(
use strict; use warnings; print "\nTest1\n"; print "\nTest2\n"; print "Press <Enter> to continue, or 'q' to quit: "; my $user_input = <STDIN>; exit if $user_input eq "q\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Is there a way to halt the program until an enter is pressed?
by GrandFather (Saint) on Mar 14, 2011 at 01:13 UTC | |
|
Re^9: Is there a way to halt the program until an enter is pressed?
by Anonymous Monk on Mar 14, 2011 at 01:10 UTC |