Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Inconsistent behavior of Getopt::Std

by jeffenstein (Hermit)
on Aug 16, 2020 at 08:48 UTC ( [id://11120806]=note: print w/replies, xml ) Need Help??


in reply to Inconsistent behavior of Getopt::Std

Getopt::Std is using the conventions traditionally used by Unix commands. For someone who's been using Unix/Linux for a long time, it's consistent with with the other(non-GNU) command's option parsing, with all of it's warts.

Getopt::Long follows the newer GNU conventions and may be closer to what you're expecting.

  • Comment on Re: Inconsistent behavior of Getopt::Std

Replies are listed 'Best First'.
Re^2: Inconsistent behavior of Getopt::Std
by likbez (Sexton) on Aug 16, 2020 at 11:55 UTC
    It depends on utility. For example vi processes options more intelligently:
    +num For the first file the cursor will be positioned on line "num". If "num" is missing, the cursor will be positioned on the last line.

      So, do you want your option processor to handle an option in the format +[num] (I'm guessing that's what you intended to write)?


      Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-23 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found