perldoc Getopt::Long
Return values and Errors
... GetOptions returns true to indicate success. It returns false when the function detected one or more errors during option parsing. These errors are signalled using warn() and can be trapped with $SIG{__WARN__}.
my $ret = GetOptions( ... ); die "usage: $0 [options]\n" unless $ret;
In reply to Re: How to die if Getopt::Long::GetOptions returns "Unknown option"
by Fletch
in thread How to die if Getopt::Long::GetOptions returns "Unknown option"
by boat73
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |