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.";
In reply to Re: Help with multidimensional arrays and IO::Socket
by sauoq
in thread Help with multidimensional arrays and IO::Socket
by macx666
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |