On 6/15/07, Bob McConnell <[EMAIL PROTECTED]> wrote:
snip
eval {
local $SIG{ALRM} = sub { die "alarm\n" }; # NB:
\n required
alarm $timeout;
$nread = sysread PORT, $line, 1;
alarm 0;
};
snip
This transmits the packet, but never comes out of the eval() if it
doesn't receive a character. Is there anything obvious that I missed?
snip
Hmm, that codes looks right. Do the two scripts I sent earlier work?
Even if this does work, can I set simultaneous alarms in multiple
threads?
Yes, I sent an example that worked for me with ActiveState's latest
version on WinXP.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/