in reply to How to die if Getopt::Long::GetOptions returns "Unknown option"

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;