http://qs321.pair.com?node_id=660735


in reply to getopt::std help

Add this to see what's going on:
use Data::Dumper; print Dumper $o;
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:
usage() if exists $o->{h};