in reply to Making Getopt::Long tell me if no parameters passed
It immediately occurred to me that GetOptions will remove items from @ARGV as it processes them. A cursory glance at the man page does not contradict that recollection.
If you count the number of items in @ARGV before you call GetOptions, you can see if any are missing afterwards. If @ARGV didn't change, you can infer that no options were found. Similarly, if @ARGV is empty, there are no options to process.
Methinks that the question you are asking GetOptions to answer is not one it tries to answer; other avenues of interrogation are called for.
yours,
Michael
|
|---|