ibanix has asked for the wisdom of the Perl Monks concerning the following question:
but apparently that's no good as GetOptions returns true even if no options are passed!#Print useage info sub useage { print "\nNifty usage info should go here\n"; exit; } my ($pass, $user, $config_file); # Get our options from the commandline; print options if not correct &usage if not (GetOptions('pass=s' => \$pass, 'user=s' => \$user, 'con +fig=s' => \$config_file));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Making Getopt::Long tell me if no parameters passed
by djantzen (Priest) on Dec 17, 2002 at 05:06 UTC | |
|
Re: Making Getopt::Long tell me if no parameters passed
by Enlil (Parson) on Dec 17, 2002 at 03:44 UTC | |
by ibanix (Hermit) on Dec 17, 2002 at 04:06 UTC | |
by Aristotle (Chancellor) on Dec 17, 2002 at 11:58 UTC | |
|
Re: Making Getopt::Long tell me if no parameters passed
by herveus (Prior) on Dec 17, 2002 at 12:42 UTC | |
|
Re: Making Getopt::Long tell me if no parameters passed
by PodMaster (Abbot) on Dec 17, 2002 at 22:27 UTC | |
|
Re: Making Getopt::Long tell me if no parameters passed
by ibanix (Hermit) on Dec 17, 2002 at 03:17 UTC |