in reply to Re: Term::Readkey GetConsoleMode error
in thread Term::Readkey GetConsoleMode error

there are other modules on CPAN that can read a single caracter from the terminal:

though i never tested them on Windows, their documentation says they should work. you might find a PPM package for them, but they should be easy to install (even manually) because they are pure Perl modules.

might be useful for you:

:)))))
  • Comment on Re^2: Term::Readkey GetConsoleMode error

Replies are listed 'Best First'.
Re^3: Term::Readkey GetConsoleMode error
by zer (Deacon) on Mar 22, 2006 at 09:09 UTC
    InKey works thanks. For some reason Komodo still produces an error... maybe i gotta stop using komodo and just do the command line thing...
    Here is working code. The demo file in the distribution has some more to it.
    #!/usr/bin/perl use strict; use lib qw(.); use Term::InKey; my ($x,$bullet); $|=1; &Clear; print "Hit a key: "; $x = &ReadKey; &Clear; print "You typed $x";

    Komodo 3.52 spits out
    Hit a key:
    Not implemented on MSWin32: The handle is invalid at C:/Perl/lib/Term/InKey.pm line 32.

    again this works in regular dos

      And wow... *grumbles*

      I looked back at my old code and guess what... it works...

      I dont think ill be using komodo again anytime soon...

      update: well.. thanks to GrandFather's help (again), have worked around this problem with komodo. Set it to debug in a seperate window...