Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: easiest way to read multiple word command arguments

by kennethk (Abbot)
on Aug 15, 2013 at 19:12 UTC ( #1049645=note: print w/ replies, xml ) Need Help??


in reply to easiest way to read multiple word command arguments

Is there a good reason you don't just use Getopt::Std or Getopt::Long, and then require that multiword input get quoted? e.g.

my_script.pl -a one -b 'two words' -c 'three words here' my_script.pl -a 'two words' -b oneword -c 'four words here now'

This would seem to be more in line with *NIX tradition.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: easiest way to read multiple word command arguments
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2015-07-01 21:33 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