I'm not sure if this is the right forum, but here goes (I'm a beginner
at posting questions to the list?)
Using Getopt::Long, it's possible to watch for negated options:
-nostuff
... and it's possible to alias options "stuff|such" allows -stuff to be
the same as -such.
So this little sample program:
$ cat stuff
#!/usr/local/bin/perl -w
use Getopt::Long;
print "Using Perl Version $]\n";
GetOptions (\%opt, "stuff|such!");
print "Stuff: <$opt{stuff}>\n";
$
Should allow one to say something like:
stuff -stuff
stuff -nostuff
stuff -such
stuff -nosuch
But look what happens:
$ stuff -stuff
Using Perl Version 5.00404
Stuff: <1>
$ stuff -such
Using Perl Version 5.00404
Stuff: <1>
$ stuff -nostuff
Using Perl Version 5.00404
Stuff: <0>
$ stuff -nosuch
Using Perl Version 5.00404
Unknown option: nosuch
Use of uninitialized value at stuff line 6.
Stuff: <>
$
Anyone seen this before?
---
Frank Bicknell, Sysadmin
Cisco Systems, Inc.
(919) 392-3798
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]