As such (such being that IO::Socket::INET does not die or set $@ on failure), you'd want one of the following code snippets:# best solution: $socketA = new IO::Socket::INET( PeerAddr => $A_box_address, PeerPort => $A_box_port, Proto => 'tcp', ) or $skipA = 1;
That is exactly how my code used to look prior to encountering this problem. I thought that eval might help me catch it, but obviously no... Everybody seems to think eval is my problem now... With the code looking exactly as above, I still do not see $skipA == 1 unless I kill the program at the PeerPort. If it is simply busy with another client, $skipA stays == 0.
In reply to Re^2: IO::Socket *always* making connection?
by wolfger
in thread IO::Socket *always* making connection?
by wolfger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |