Quote,
-s enables rudimentary switch parsing for switches on the command
line after the program name but before any filename arguments (or
before an argument of --).
I read this as meaning that the -s flag must be before an argument of
"--". You're saying it's the opposite?
You are running a perl executable, which is in turn running a Perl program.
The executable has to decide which of the arguments are meant for it, and
which are meant to be passed on to the program that it is in turn running.
The -s switch tells the perl executable to preprocess some of the arguments
to the Perl program in a certain way.
$ perl -e 'print "ARGV is @ARGV"; print "VAR is $VAR"' \
-l -s -- -VAR=foo -- bar
ARGV is bar
VAR is foo
Arguments before the first '--' are arguments/switches to the perl
executable, not to the Perl program.
Arguments after the first '--' are arguments/switches to the Perl program,
(which in this case is the string specified by -e).
Arguments after the first '--' but before the second one are arguments to
the Perl program eligible to be munged at the command of the -s switch.
Arguments after the second '--' are arguments to the Perl program which
are protected from being munged by the -s switch.
Xho