in reply to Using -- to terminate switch processing
Is that -l -o -n -g, or the word long. With this:$ mycommand -long
the intent is clear.$ mycommand --long
With option processing that can handle both long and short forms of options, with and without args, you need a way to determine where option processing (and any associated args) ends, and where command arguments begin. Use "--" to define that endpoint.
If you use even moderately complex command option processing, e.g. with Getopt::Std, you will find times when you must terminate option processing with "--". However, I doubt in the shebang line is one of those places.
|
|---|