you're specifying that -n takes an argument, but then passing it none,
so it's interpreting the trailing -h as such,
On Friday, August 2, 2002, at 01:32 PM, [EMAIL PROTECTED] wrote:
> I'm not sure if this is a problem with Getopt::Std or if it's just me,
> but
> I'm having some issues getting this to cooperate:
>
> use Getopt::Std;
> my %OPT = ();
> getopt('dhnt:', \%OPT);
>
> ....and later...
>
> if (exists($OPT{'h'})) {
> ## print usage and exit...
>
> If I call my script with ./myscript.pl -h, it prints usage fine.
> However,
> if I call the script using ./myscript.pl -n -h, the -h flag gets
> ignored,
> and my hash looks like:
>
> DB<1> x %OPT
> 0 'n'
> 1 '-h'
> DB<2>
>
>
> What am I missing?
>
> Thanks,
>
> Chris
>
> --
> [EMAIL PROTECTED]
> GnuPG Fingerprint: F96E FB68 5C8F 97CF 70B7 9208 0BF0 7F09 BC1B F0C8
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
// George Schlossnagle
// Principal Consultant
// OmniTI, Inc http://www.omniti.com
// (c) 240.460.5234 (e) [EMAIL PROTECTED]
// 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]