in reply to Error Disappears

The problem is that you have to press enter to get STDIN to feed your data to the string. What I want to know is how you read keypresses, or get STDIN to do a character by character feed so you don't have to press enter at the end of each piece of data.

Replies are listed 'Best First'.
Re^2: Error Disappears
by tachyon (Chancellor) on Oct 28, 2004 at 05:37 UTC

    You can use Term::ReadKey. Alternatively on Win32 you could use use Win32::API and GetAsyncKeyState. For example this is a keylogger that will burn 50% of your system resources, depending on the sleep time.

    use Win32::API; Win32::API->Import("user32", "int GetAsyncKeyState(int I)"); while(1) { for(32..128) { $state = GetAsyncKeyState($_); next unless $state; print chr($_); } select(undef,undef,undef,0.1); }
    Node text goes above. Div tags should contain sig only -->

    cheers

    tachyon