On Mon, Sep 03, 2001 at 05:42:00PM +0100, Leon Brocard wrote:
> Hi,
[...]
> ie instead of the following output (where I type 'o' and then 'p' and
> then return and then Control-C):
>
> $ nc localhost 31008
> [acme@piglet acme]$ nc localhost 31008
> Hello, client!
> op
> Left!
> Right!
> punt!
>
> I want the output to be:
> $ nc localhost 31008
> [acme@piglet acme]$ nc localhost 31008
> Hello, client!
> oLeft!
> pRight!
> punt!
Netcat is reading input in canonical mode. The main upshot is: it
waits for a newline before presenting the input to the program.
Try this:
perl -wle 'print while ($_ = getc())'
And type some characters (and press ENTER).
Now try the same with this (mind you, getting out of -icanon mode may
be difficult on some systems):
stty -icanon; perl -wle 'print while ($_ = getc())'
-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net