in reply to stdin problem

use strict; use Term::ReadKey; print qq(Please enter a character: ); ReadMode 'cbreak'; my $ans = ReadKey(0); ReadMode 'normal'; print qq(\nYour character is '$ans'\n);<p>
jeffa

Replies are listed 'Best First'.
Re: (jeffa) Re: stdin problem
by Rich36 (Chaplain) on Oct 10, 2001 at 01:53 UTC
    Thanks very much. That worked great. I wouldn't have even known to look for that module...

    Rich36

      perldoc -q key eventually will show the following (which mentions Term::ReadKey in adition to other mechanisms):

      Found in /usr/lib/perl5/5.6.1/pod/perlfaq5.pod How can I read a single character from a file? From the keyboard?