Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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]
[Eily]: LanX how does the first link work, should I send a message to rat? :D
[LanX]: yes, or click the second link
[LanX]: hmm there is an xml ticker for threads

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2018-03-19 09:58 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (238 votes). Check out past polls.