|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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? Thanks in advance, Jose Luis |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 30.05.2007, Jose Luis <jose.luis.fdez.diaz@gmail.com> wrote:
> 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? `man perlrun', option -e -- Secunia non olet. Stanislaw Klekot |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 *** |
|
![]() |
| Outils de la discussion | |
|
|