Great Circle Associates Majordomo-Users
(April 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: domo with Perl 5
From: dwolfe @ risc . sps . mot . com (Dave Wolfe)
Date: Tue, 18 Apr 1995 15:17:17 -0500 (CDT)
To: uunet!zip . sbi . com!dmacfarlane @ uunet . uu . net (David Macfarlane)
Cc: uunet!greatcircle . com!majordomo-users @ uunet . uu . net
In-reply-to: <9504181634.AA21172@zip35_1_1.sbi.com> from "David Macfarlane" at Apr 18, 95 12:34:30 pm
Reply-to: David Wolfe <david_wolfe @ risc . sps . mot . com>

[ David Macfarlane writes: ]
> > I'm not really clear on this explanation.  Do I change every single
> > "@" to "\@"?
> 
> Not exactly.  Perl 5 only expands the @ inside double quoted text
> strings.  So you would change
> 
> print << "EOF"
> me@here
> EOF
> 
> but not
> 
> print << EOF
> me@there
> EOF
> 
> ... because the second one does not do double-quoted-string expansion.
> That's how I've interpreted this issue and it is working so far (it seems!).

Not quite. Page 72 of the Camel says "An unquoted identifier works like
double quotes" so the 2 examples above are identical. Try the following
script to see the (non-)differences:

$xyzzy="burp!";
print <<EOF;
"$xyzzy" said the wizard.
EOF
print <<"EOF";
"$xyzzy" said the wizard.
EOF
print <<'EOF';
"$xyzzy" said the wizard.
EOF

-- 
 Dave Wolfe    *Not a spokesman for Motorola*  (512) 891-3246
 Motorola MMTG  6501 Wm. Cannon Dr. W. OE112  Austin  TX  78735-8598


References:
Indexed By Date Previous: Re: domo with Perl 5
From: dmacfarlane@zip.sbi.com (David Macfarlane)
Next: local list protection & rcs
From: Heas <heas@maelstrom.Timeplex.COM>
Indexed By Thread Previous: Re: domo with Perl 5
From: dmacfarlane@zip.sbi.com (David Macfarlane)
Next: a new way to bypass moderation
From: Elizabeth Lear <eliz@world.std.com>

Google
 
Search Internet Search www.greatcircle.com