In article <1180507741.259940.164980@q69g2000hsb.googlegroups .com>,
Jose Luis <jose.luis.fdez.diaz@gmail.com> wrote:
> Hi,
>
> In the ksh script below:
>
> #!/usr/bin/ksh
>
> perl <<-EOF
> my \$var="hello world\n";
> print "\$var";
> EOF
>
>
>
> I need to put the "\" character before all vars in the perl script.
> How can I avoid it?
perl <<-'EOF'
my $var="hello world\n";
print "$var";
EOF
Putting single quotes around the here-document delimiter tells the shell
not to perform any expansion on the contents of the here-document.
--
Barry Margolin,
barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***