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

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:

./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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://921547]
help
Chatterbox?
[Eily]: "@{/}" does interpolate @/ though
[Eily]: (while the same for @*, @(, and @) throw a warning)
[talexb]: TStanley Cool. Yeah, that's about 45 minutes away. Nice spot.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2017-06-23 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (548 votes). Check out past polls.