in reply to Re^2: Getopt::Std and simple options
in thread Getopt::Std and simple options

Checking the return value from each of the Getopt::* variants is what makes these functions really useful. An idiom that I use almost constantly for command-line tool scripts goes like this:
my $Usage = "Usage: $0 -a [-b arg] whatever ...\n"; getopts( ... ) or die $Usage;
When I need a reminder about the command line syntax for one of my scripts (this happens a lot), I just run it with "-?" as the only arg; since I never use "?" as an option flag, I always get the usage message.