Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Keep It Simple, Stupid
 
PerlMonks  

Re: GetOpt ignore required arguments

by linuxer (Deacon)
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:

./skript.pl -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.
edits:
  • s/mark an end/mark the end/
  • added some missing paragraph tags


Comment on Re: GetOpt ignore required arguments
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-04-17 04:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (439 votes), past polls