in reply to Re: Re: Re: getopt?
in thread getopt?

Actually, you don't even need to live with the double hyphen. Single hyphen is also parsed by Getopt::Long. Note that clustering does not work, however: -rex gets interpreted as one option, 'rex' (Update: (thanks chipmunk!) unless you turn them on). But otherwise you can use single-letter options as long as they are distinct. If you really want to do this sort of option-parsing, though, try Getopt::Mixed.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: getopt?
by chipmunk (Parson) on Oct 25, 2001 at 19:15 UTC
    Getopt::Long does support bundling of single-letter options, e.g. -rex for -r -e -x. This feature is just not enabled by default. You can turn it on with: Getopt::Long::Configure('bundling'); Getopt::Long has quite a few configuration options, all of which are explained in the documentation.