in reply to More on Processing Command Line Arguments

am I missing something in Getop::Long that marks entries as being required or selective
You aren't. As Johan (author of Getopt::Long) likes to say: when arguments are required, they aren't options.

Abigail

  • Comment on Re: More on Processing Command Line Arguments

Replies are listed 'Best First'.
Re: Re: More on Processing Command Line Arguments
by Ninthwave (Chaplain) on Oct 31, 2003 at 16:39 UTC

    Is there a better method for doing this. Should I make the program interactive with a menu instead. I lean towards options because they can be scripted themselves. So I could use the above code script.pl -v record_ID >output.txt or script.pl -a <input.txt

    Though I would have to change a because right now it requires a parameter passed to it and it really shouldn't

      When I want to make arguments required, I use Getopt::Long, and just put in an additional check for the 'option' that I want to be required.

      Abigail