http://qs321.pair.com?node_id=928744


in reply to Re^2: Ask for STDIN but don't pause for it
in thread Ask for STDIN but don't pause for it

Works here. Are you hitting Enter to finish the line input? Otherwise use sysread.
$ ./928062.pl
Fri Sep 30 06:56:53 2011
Fri Sep 30 06:56:58 2011
asdfasfsad
GLOB(0x7afe00)
got: asdfasfsad
Fri Sep 30 06:57:02 2011
^C

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^4: Ask for STDIN but don't pause for it
by Anonymous Monk on Feb 01, 2012 at 10:24 UTC

    same problem sysread doesn't solve. It seems a matter of not blocking can_read. Did you manage to have it working?

      It works on Linux, it doesn't on Windows XP. Do you know why? thank you

        Because cmd.exe is not bash, or csh, or ..... there is a reason abstractions such as Curses/Term::Readline::Gnu were invented