dr_beln0ck has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use IO::Socket; sub sock() { $sock= new IO::Socket::INET ( PeerAddr => $_[0], PeerPort => $_[1], Proto => 'tcp' ); if ($sock){print "port $start_port open\n";} } ($host,$start_port,$end_port) = @ARGV; for(;$start_port<$end_port;$start_port++) { &sock($host,$start_port); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Socket help
by vek (Prior) on Mar 26, 2002 at 19:28 UTC | |
by dr_beln0ck (Friar) on Mar 26, 2002 at 19:41 UTC | |
by FoxtrotUniform (Prior) on Mar 26, 2002 at 22:53 UTC | |
by dr_beln0ck (Friar) on Mar 27, 2002 at 16:36 UTC |