Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: GetOpt ignore required arguments

by linuxer (Curate)
on Aug 21, 2011 at 19:43 UTC ( #921547=note: print w/replies, xml ) Need Help??

in reply to GetOpt ignore required arguments

So you are referring to Getopt::Std?

Did you try to use -- to mark the end of the options? For example:

./ -opt1 -opt2 foo -- -take -us -as -arguments

See the module documentation of Getopt::Std, which says:

To allow programs to process arguments that look like switches, but aren't, both functions will stop processing switches when they see the argument --. The -- will be removed from @ARGV.
  • s/mark an end/mark the end/
  • added some missing paragraph tags

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://921547]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2016-10-27 02:35 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (352 votes). Check out past polls.