Relevant code:
use strict;
use Getopt::Std;
my %options;
getopts('hdPp:remno', \%options);
I want to call the help sub [which displays a help message] if either of the two following conditions are met:
1. the h flag is specified
2. getopts returns NO command-line options.
Here's what I've tried, with various errors
help() if($options{'h'} || !defined \%options || !defined $options);
Anybody know what I'm doing wrong? Googling hasn't returned what I'm looking for.