in reply to Serial I/O and time question

To time out, I would use  sleep and  SIG{ALRM} like so:
$SIG{ALRM} = \&timeout_code; alarm = $N; while (<COM>) { $out .= <COM>; } $SIG{ALRM} = "";

-Mark

Replies are listed 'Best First'.
Re: Re: Serial I/O and time question
by shepner (Initiate) on Feb 20, 2004 at 00:41 UTC
    thanks! Ill give it a try. It never ceases to amaze me how simple perl can do some things.... :)