#!/usr/bin/perl -w use strict; use Getopt::Long my ( $targ, $opt_targ, $firstport, $opt_firstport, $lastport, $opt_lastport, $proto, $opt_proto, $udptimeout, $opt_udptimeout, $contimeout, $opt_contimeout, $help, ); GetOptions( 'targ=s' => \$opt_targ, 'firstport=s' => \$opt_firstport, 'lastport=s' => \$opt_lastport, 'proto=s' => \$opt_proto, 'udptimeout=s' => \$opt_udptimeout, 'contimeout=s' => \$opt_contimeout, 'help!' => \$opt_help, ); if (defined $opt_targ){ $targ = $opt_targ } else {$targ='localhost';} if (defined $opt_firstport){ $firstport = $opt_firstport } else {$firstport=1;} if (defined $opt_lastport){ $lastport = $opt_lastport } else {$lastport=1024;} if (defined $opt_proto){ $proto = $opt_proto} else {$proto='tcp';} if (defined $opt_udptimeout){ $udptimeout = $opt_udptimeout } else {$udptimeout=3;} if (defined $opt_contimeout){ $contimeout = $opt_contimeout } else {$contimeout=3;} if (defined $opt_help){ Usage('You rang, sir?'); exit; }