unless ($option{f} && $option{h}) { die "If you use -f, you must also use -h, and vice versa."; } #### if ($option{f} && !$option{h}) { die "If you use -f, you must also use -h"; } if ($option{h}) { ... }