reasonablekeith has asked for the wisdom of the Perl Monks concerning the following question:

Caveats being.. must run under Windows, without a c compiler.

As far as I can see, the lack of compiler means I can't install Term::Readkey, (which doesn't come with the recent version of active-state perl I'm using). I did find Hotkey.pm in the docs, but that dies because...

POSIX::termios not implemented on this architecture
I also tried the solution proposed in How can I read a single character from a file? From the keyboard?, that got a single character, but I still had to wait for <RETURN>

I do have Term::Cap, so if there's a way of doing a readmode('cbreak') equivalent that might be an option. Other than that I've drawn a bit of a blank. Anyone?

Cheers, Rob.

---
my name's not Keith, and I'm not reasonable.

Replies are listed 'Best First'.
Re: Reading char-by-char from STDIN
by davidrw (Prior) on May 13, 2005 at 15:28 UTC
    Can you install Term::Readkey via ppm? run ppm3 in a dos prompt and then do:
    install http://www.bribes.org/perl/ppm/Term-ReadKey.ppd
    Update: Activestate has the latest version (2.30) as well, so you should just be able to run install TermReadKey inside ppm3.

    Update: fixed my capn -> cpan typo.
      I did try to install it via the CPAN module, which fails on a make. I've never used ppm; I'll give it a go.

      Thanks

      ---
      my name's not Keith, and I'm not reasonable.
Re: Reading char-by-char from STDIN
by Anonymous Monk on May 14, 2005 at 03:38 UTC
    use cygwin and then you have a complete environment including the gcc compiler, X windows, the whole bit (or any subset).

    http://www.cygwin.com
    • download setup.exe and run it and follow the prompts
    • you'll need to select some of the pkgs in addition to the default set, things like gcc, make, lynx, wget, perl, less, etc.
    • once you've got the environment setup, you can run the CPAN.pm shell, and download and compile whatever modules you need

    good luck!
    donq