[0] # cat parameter_check.pl use v5.10; use warnings; use strict 'subs'; use feature 'state'; use Getopt::Std; getopts("b:cd:",\%options); if( exists $options{'b'} ){ if( $options{'b'} ){ say "option b $options{'b'}"; }else{ say "b is zero length string or equvalent"; } }else{ say 'key b does not exist'; } say "option c:", $options{'c'}; say "option d: ", $options{'d'};