- or download this
echo print join ' ', $0, $R > switch-test.pl
...
# wrong usage
perl -s switch-test.pl -- -R=OK
switch-test.pl
- or download this
# after the program name
perl -s -e "print join ' ', $0, $R" -R=OK
...
# it works in the opposite way of what perlrun states
perl -s -e "print join ' ', $0, $R" -- -R=OK
-e OK
- or download this
perl -snwe "print join ' ', $0, $R, $/" -- -R=OK lorem.txt
...
-e OK
-e OK
-e OK
- or download this
perl -wse "print join ' ', $0, $R" -- -R=OK
-e OK
...
perl -sew "print join ' ', $0, $R" -- -R=OK
#what the hell?! ..no output :)