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};
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: getopt::std help
by convenientstore (Pilgrim) on Jan 07, 2008 at 02:57 UTC | |
by hipowls (Curate) on Jan 07, 2008 at 08:04 UTC | |
by convenientstore (Pilgrim) on Jan 08, 2008 at 23:21 UTC |
In Section
Seekers of Perl Wisdom