The command
perl -ne "print "" """ AnyTextFile.txt
running on Windows with latest ActivePerl installed (5.020) complains Can't find string terminator '"' anywhere before EOF at -e line 1.
. Other characters or variables work as expected, like
perl -ne "print ""$.-$_""" AnyTextFile.txt
I checked that double quotes are passed to perl as expected, even if it is a little weird when escape double quotes in cmd.exe. Why space cannot be shown in the above double quoted string? Using single quote could work but it loses variables interpolation functionality.
Why?
A lot of programs get its arguments by means of the standard argument parser used by the C library initially used to compile the language itself, its libraries or used as a base.
For windows, in general, the "rules" for argument parsing are