an invalid option is one that you don't expect the user to enter or
one that is actually not in a valid form? consider the following(foo.pl):
#!/usr/bin/perl -w
use strict;
use Getopt:Long;
$SIG{__WARN__} = sub { print "WARNING WARNING\n"; };
sub process{
print "BAD: ",shift,"\n";
}
my
Paul Tremblay <[EMAIL PROTECTED]> wrote:
> I would like to have my script print a short help message and then
> quit if a user uses an invalid option. I am using the Getopt::Long
> module.
>
> Also, I've noticed that some scripts have a trick whereby if a user
> types
>
> scriptname --help
>
>
I would like to have my script print a short help message and then
quit if a user uses an invalid option. I am using the Getopt::Long
module.
Also, I've noticed that some scripts have a trick whereby if a user
types
scriptname --help
The script prints on the pod. There is a link on perldoc.com