use vars qw /%option/; getopt('m:f:l:s:q:h', \%option); #### if ($option{f}) { die "You must use the -f option along with another option\nRun $0 -h to view all available options\n" unless (($option{f}) && ($option{l} || $option{m} || $option{d})); $ctlFile = "$option{f}"; }