That you are using Getopt::Std. (Else modify for
however you are processing command line options.)
That you have -h as a command line option that you
will accept without arguments, whose presence indicates
that you will display a help screen instead of running.
This implements the -h option.
if ($opt_h) {
exec("perldoc", $0) or die "Cannot execute 'perldoc': $!";
}
Nice, but I would tend to use that for an invalid
invocation, and use the full documentation for a help
screen. YMMV.
UPDATE chromatic pointed out to me that you can get the full
documentation out of Pod::Usage. But not as
easily, and without the convenient pager behaviour...