in reply to Non blocking read on a filehandle

non-blocking reads from the cookbook.
use Fcntl; sysopen(MODEM, "/dev/cua0", O_NONBLOCK|O_RDWR) or die "Can't open modem: $!\n";
be warned : once the file handle's non blocking, statements that try to switch back will return undef and set $!.

--
Hope this helps -- my OS doesn't have any of this fancy blocking or nonblocking hoo-hah, so I can't test properly ;-)

Replies are listed 'Best First'.
Re: Re: Non blocking read on a filehandle
by odie (Sexton) on Jan 30, 2001 at 19:53 UTC
    But this is only for files, right? Not processes... =)

    --
    I am a manual signature virus. Copy me please!