in reply to how to run commandline perl on windows
'perldoc perlrun'
Command-interpreters on non-Unix systems have rather different ideas on quoting than Unix shells. You'll need to learn the special characters in your command-interpreter ("*", "\" and """ are common) and how to protect whitespace and these characters to run one-liners (see -e below).So you'd have to try something likeOn some systems, you may have to change single-quotes to double ones, which you must *not* do on Unix or Plan 9 systems. You might also have to change a single % to a %%.
For example:
The problem is that none of this is reliable...# Unix perl -e 'print "Hello world\n"' # MS-DOS, etc. perl -e "print \"Hello world\n\"" # Macintosh print "Hello world\n" (then Run "Myscript" or Shift-Command-R) # VMS perl -e "print ""Hello world\n"""
Writeup formatting tipsperl -ane " $total += $F[9]; END {print $total} " sem.log
In Section
Seekers of Perl Wisdom