in reply to perlrun doc inaccurate on -s switch
In case of -e it's the -e switch that "consumes" the double-dash, signaling "end of perl options". You may use a second double-dash to separate the script's argument from its options.
$ perl -s -e 'print join ":", $0, $R, @ARGV' -- -R=OK -e:OK $ perl -s -e 'print join ":", $0, $R, @ARGV' -- -- -R=OK -e::-R=OK
Update
After re-reading, I dislike my wording. It is not the -e switch consuming the double-dash, it is perl command itself.
Greetings,
🐻
|
---|