Getopts problem
- From: "BS" <minimyme@xxxxxxxxx>
- Date: 27 Apr 2006 19:42:56 -0700
Hi,
I just installed perl 5.8.8 on a xp pro box and having issues with the
getopts. If execute the script directly on the command line, the flags
in the script do not get set. If I run the script by prefixing the
per.exe, getopts works correctly. Any pointers how can I resolve this?
The script is pasted below. It dies on the very first die statement.
#!c:/per/bin/perl
use Getopt::Std;
getopts('a:c:');
die "Getopt not working opt a not set\n" if ( ! defined($opt_a) );
die "Getopt not working opt c not set\n" if ( ! defined($opt_c) );
print "$opt_a is the value for opt a\n";
print "$opt_c is the value for opt c\n";
.
- Follow-Ups:
- Re: Getopts problem
- From: Paul Lalli
- Re: Getopts problem
- From: BS
- Re: Getopts problem
- Prev by Date: Re: File transfer and encryption
- Next by Date: simple wildcard regex problem.
- Previous by thread: RE: How to test result of an extraction?
- Next by thread: Re: Getopts problem
- Index(es):
Relevant Pages
|