http://www.perlmonks.org?node_id=33600


in reply to What is a good "Press any key to continue" code?

use Term::ReadKey:
use Term::ReadKey; ReadMode 4; # Turn off controls keys while (not defined ($key = ReadKey(-1)) { # No key yet } print "Got key $key\n"; ReadMode 0; # Reset tty mode before exiting