in reply to Term::ReadKey problem!

Well, it sort of works for me on linux. That is: i can enter chars, see the "BACKSPACE!" output when i press backspace and see "WORD:" when i press enter. Ofcourse, since you're interpreting every keystroke yourself it fails to recognize EOF (^D) and a lot of other standard console shortcuts.

If you just want a lowlevel line-reading routine, you're probably better off with something like:

print "> "; while (<STDIN>) { chomp; print "WORD: $_\n> "; }

Have you tried re-insterting the $|=1 line?

updated: fixed some grammar and spelling mistakes

Replies are listed 'Best First'.
Re^2: Term::ReadKey problem!
by Ace128 (Hermit) on Jun 15, 2006 at 16:15 UTC
    Seems to be working fine in Linux, but not in Windows (as usuall). So typical! What to do now? This way I could do whatever on those special keys. So, yep, bug in windows. Enter key is eaten up in readmode 4.