in reply to Help with multidimensional arrays and IO::Socket
if (!($inactive)) { print " $pt is up\n"; } else { print " $pt is down\n"; } close $call;
Leaving style out of it, the quick fix is to put close $call; inside your if (! ($inactive)) clause as you only want to close it if it isn't inactive.
Taking style into account, you don't need your $inactive variable at all and it amounts to a double negative in your if clause making it difficult to read. Why not just use $call itself?
-sauoq "My two cents aren't worth a dime.";
|
|---|