in reply to flip-flop socket locations if 1 is down

Try changing:
last if($remote = IO::Socket::INET->new(Proto => 'tcp', PeerAddr => $ +transaction_ips[($i%2)], PeerPort => 8120, Timeout => 5));
to:
$remote = IO::Socket::INET->new(Proto => 'tcp', PeerAddr => $transacti +on_ips[($i%2)], PeerPort => 8120, Timeout => 5)); last if $remote;



This is not a Signature...

Replies are listed 'Best First'.
Re^2: flip-flop socket locations if 1 is down
by bear0053 (Hermit) on Jun 09, 2005 at 22:46 UTC
    thank you for your suggestion. can i ask what is the reason that you suggested this change?
    is the first way not doing the same thing by checking the result of the assignment.