Paul wrote:
>
> Another possible solution is to use Brian Ingerson's Inline.pm and code
> the reads &c. with C's lower level IO. I think a C getc() would do
> it....
>
> But be warned that, while it's actually quite friendly, a raw beginner
> might have some trouble with the Inline stuff, especially if they don't
> know C. I'd say look, maybe try, and decide based on your own
> confidence.
sysread() correctly bypasses all the buffering that it can. getc()
straight from C will be no better (it calls the same read() that
sysread() does.) The buffering is happening in the tty layer, which is
not making any data available until a return key is pressed. You'll need
something like Term::ReadKey. Do
perldoc perlfaq8
to see a complete description of this.