in reply to getopt::std help
Add this to see what's going on:
And you'll see that the key 'h' _is_ being created, and the value is undef, which is why your if statements don't pick it up, since it's a false value. This will do what you want:use Data::Dumper; print Dumper $o;
usage() if exists $o->{h};
In Section
Seekers of Perl Wisdom