in reply to Using perl to output a DOS batch file
You can use another delimiter for your string to reduce confusion. eg, my $foo = 'bar'; qq{echo $foo\r\n};