M
mothra
Hi All,
I am having problems parsing command line options using Getopt::Long.
It would seem that this module will only process the first option. This
only happens on the windows platform. Here is a simple script that will
demonstrate my problem.
#!/app/bin/perl
use strict;
use warnings;
use Getopt::Long;
my %options;
my $success = GetOptions ( \%options, 'sd=s', 'ed=s' );
print "$_ -> $options{$_}\n" foreach( keys %options );
print Getopt::Long::VersionMessage();
output: (on windows)
F:\scripts>my.pl --sd=01/01/2004 --ed=02/09/2004
sd -> 01/01/2004
F:\scripts\my.pl
(Getopt::Long::GetOptions version 2.34_02; Perl version 5.8.3)
F:\scripts>
I tried this same script on HPUX 11.11
output: (HPUX)
$ ./my.pl --sd=01/01/2004 --ed=02/09/2004
ed -> 02/09/2004
sd -> 01/01/2004
../my.pl
(Getopt::Long::GetOptions version 2.34_02; Perl version 5.8.0)
$
Can someone else (that is using windows) try this simple script to see if
the problem can be reproduced?
Thanks
Mothra
I am having problems parsing command line options using Getopt::Long.
It would seem that this module will only process the first option. This
only happens on the windows platform. Here is a simple script that will
demonstrate my problem.
#!/app/bin/perl
use strict;
use warnings;
use Getopt::Long;
my %options;
my $success = GetOptions ( \%options, 'sd=s', 'ed=s' );
print "$_ -> $options{$_}\n" foreach( keys %options );
print Getopt::Long::VersionMessage();
output: (on windows)
F:\scripts>my.pl --sd=01/01/2004 --ed=02/09/2004
sd -> 01/01/2004
F:\scripts\my.pl
(Getopt::Long::GetOptions version 2.34_02; Perl version 5.8.3)
F:\scripts>
I tried this same script on HPUX 11.11
output: (HPUX)
$ ./my.pl --sd=01/01/2004 --ed=02/09/2004
ed -> 02/09/2004
sd -> 01/01/2004
../my.pl
(Getopt::Long::GetOptions version 2.34_02; Perl version 5.8.0)
$
Can someone else (that is using windows) try this simple script to see if
the problem can be reproduced?
Thanks
Mothra