in reply to Re^3: 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?
It just waits without printing the print statement,I mean it is already expecting a user input without printing the print statement.\
print "Press <Enter> to continue, or 'q' to quit: "; my $input = <STDIN>; exit if $input eq "q\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Is there a way to halt the program until an enter is pressed?
by GrandFather (Saint) on Mar 14, 2011 at 00:43 UTC | |
by Anonymous Monk on Mar 14, 2011 at 00:47 UTC | |
by GrandFather (Saint) on Mar 14, 2011 at 00:50 UTC | |
by Anonymous Monk on Mar 14, 2011 at 01:05 UTC | |
by Anonymous Monk on Mar 14, 2011 at 01:10 UTC | |
by GrandFather (Saint) on Mar 14, 2011 at 01:13 UTC |