How to handle main option with Getopt
Posted
by Jérôme
on Stack Overflow
See other posts from Stack Overflow
or by Jérôme
Published on 2010-06-03T13:22:53Z
Indexed on
2010/06/03
13:24 UTC
Read the original article
Hit count: 178
I want to handle a feature which seems to me almost natural with programs, and I don't know how to handle it with Getopt perl package (no matter Std ot Long).
I would like something like:
./perlscript <main option> [some options like -h or --output-file some_name]
Options will be handled with - or --, but I want to be able to let the user give me the main and needed option without dashes.
Is Getopt able to do that, or do I have to handle it by hand?
© Stack Overflow or respective owner