Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 taking refuge in the Monastery: (12)
As of 2015-07-01 21:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls