in reply to Requiring option values in Getopt::Long
Here's the result when I ran some tests.#!/usr/bin/perl use warnings; use strict; use Getopt::Long; my ($option_test); my $check_option = GetOptions( "test=s" => \$option_test ); die 'Invalid option' if ( $check_option ne 1 ); print "next line";
Thank you all for your help.$ test.pl next line $ test.pl -t abc next line $ test.pl -t Option test requires an argument Invalid option at test.pl line 9.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Requiring option values in Getopt::Long
by ikegami (Patriarch) on Aug 20, 2009 at 03:27 UTC | |
by zwon (Abbot) on Aug 20, 2009 at 18:31 UTC |