my ($db,$killswitch,$configDepth,$hostname) #default values = (0 ,0 ,-1 ,''); GetOptions( 'v!' => \$db , 'k!' => \$killswitch , 'd=i'=> \$configDepth , 'H=s'=> \$hostname ); if( $configDepth == -1){ print $0.' requires the -d switch with a depth value.'.$cr; die; } if( $hostname == '' ){ print $0.' requires the -H with a hostname or comma-seperated list of hostnames.'.$cr; die;}