# Start a loop to check for all correct switches, and apply input filenames to variables while ( $done != 0 ) { if ( $count == 6 ) { print "\n *** Error : Incomplete (or incorrect) command-line switches and arguments were provided. ***\n\n" ; print " $0 -l -u -r \n\n" ; print " -l The relative or absolute path to the webserver logfile.\n" ; print " -u The relative or absolute path to the user list file.\n" ; print " -r The relative or absolute path to the generated report file.\n\n" ; exit 202 ; } if ( $ARGV[$count] =~ /^-l$/i ) { $inputfile = $ARGV[$count + 1] ; $done-- ; } if ( $ARGV[$count] =~ /^-u$/i ) { $userlist = $ARGV[$count + 1] ; $done-- ; } if ( $ARGV[$count] =~ /^-r$/i ) { $outputfile = $ARGV[$count + 1] ; $done-- ; } $count = $count + 2 ; }