Re: Getopts problem



Update with the screenshot

C:\>type a.pl
#!c:\perl\bin\perl

use Getopt::Std;

getopts('a:s:');

die "Error with getopt\n" if ( ! defined($opt_a) );
print "$opt_a\n" if ( defined ( $opt_a ) );
print "$opt_s\n" if ( defined ( $opt_s ) );

C:\>perl a.pl -atest -stest
test
test

C:\>a.pl -atest -stest
Error with getopt

.