in reply to Re^6: 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?

I can, but I'm disinclined to acquiesce to your request. Go read the documentation I pointed you at or try it out in a test script (or both). Either way you'd have an answer before you received this reply.

True laziness is hard work
  • Comment on Re^7: Is there a way to halt the program until an enter is pressed?

Replies are listed 'Best First'.
Re^8: Is there a way to halt the program until an enter is pressed?
by Anonymous Monk on Mar 14, 2011 at 01:05 UTC

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

      Figured it out ,just setted the variable ,it works- Thanks!

      I'm confused: I can't see where you set $|.

      True laziness is hard work