-1
C:\Windows\system32>perl -e 'print "Hello World\n"'
Can't find string terminator "'" anywhere before EOF at -e line 1.
melpomene
  • 84,125
  • 8
  • 85
  • 148

1 Answers1

4

On MSWin, single quotes behave differently to *nix shells. You need double quotes instead, and for the inside, use the qq operator.

perl -e "print qq(Hello World\n)"
choroba
  • 231,213
  • 25
  • 204
  • 289