in reply to netcat in perl

Here is a start for you. But I believe netcat will tell you if it can't connect. Why not run netcat thru some IPC. Or use a netcat written in Perl, see netcat.pl
#!/usr/bin/perl use IO::Socket; $addr = '192.168.0.1'; $port = '80'; $socket = eval { return IO::Socket::INET->new( Proto => "tcp", PeerAddr => $addr, PeerPort => $port, Reuse => 1, Timeout => 10) or return undef; }; if ($socket) { print "Port open\n"; eval { return $socket->close; }; return 1; } else { print "Port NOT open\n"; return undef; }

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh