Parsing command line options in Perl
Posted
by Jay Gridley
on Stack Overflow
See other posts from Stack Overflow
or by Jay Gridley
Published on 2010-03-16T15:13:26Z
Indexed on
2010/03/16
15:21 UTC
Read the original article
Hit count: 174
perl
Hi guys,
I am parsing command line options in Perl using Getopt::Long. I am forced to use prefix - (one dash) for short commands (-s) and -- (double dash) for long commands (ex. --input=file), but problem is, that there is one special option (-r=) so it is long option for its requirement for argument, but it has to have one dash (-) prefix not double dash (--) like other long options. Is possible to setup Getopt::Long to accept these?
© Stack Overflow or respective owner