in reply to Required options processing Getopt::Long

As Johan Vromans, the author of Getopt::Long, likes to say, Getopt::Long is for parsing *options*. Arguments that are required are not options.

Hence, calling the script without arguments isn't a failure according to GetOptions, and no usage message will be generated.

You will have to do this checking yourself.

Abigail

  • Comment on Re: Required options processing Getopt::Long

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.