my %options; my @required = qw(table id_field); GetOptions ( \%options, 'table=s', 'id_field=s', 'state_field=s', 'zip_field=s', 'dob_field=s', 'help|?', 'man' ) or die pod2usage(2); # dies if an unlisted option is given # if an option isn't specified, it isn't set in the hash so # we look for the ones we want and make certain they're there die pod2usage(2) if grep(!exists $options{$_},@required);