the send method might return a failure code. The underlying
libraries usually return -1 on failures. I don't know exactly
what the $sock object is, so the following suggestions
are completely untested. I've been doing networking in C
recently and I'm checking for -1s all over the place.
- my $wlen = eval { $sock->send( "I heard $buff\n" ) };
+ my $wlen = eval { $sock->send( "I heard $buff\n" ) or die $! };
or,
$wlen = sock->send("message");
if (wlen < 1){
# something is up
On 12/20/05, Ivan Heffner <[EMAIL PROTECTED]> wrote:
> No error is thrown to trap. That's part of the problem. :-/