Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: quotes in Perl

by nedals (Deacon)
on Oct 21, 2004 at 07:02 UTC ( #401076=note: print w/ replies, xml ) Need Help??


in reply to quotes in Perl

Minor gotcha in the here-is doc

print <<HTML; .. <style type="text/css"> \@import(url) </style> .. .. HTML
Don't forget to escape the '@' symbol.


Comment on Re: quotes in Perl
Download Code
Re^2: quotes in Perl
by apotheon (Deacon) on Oct 21, 2004 at 07:24 UTC
    I don't know what you're referring to, as there's nothing remotely similar to the example code you've indicated in the text of my tutorial. I have added a notation about escaping @ and $ symbols in interpolated strings within the "escape characters" section, however.

    - apotheon
    CopyWrite Chad Perrin
Re^2: quotes in Perl
by Happy-the-monk (Abbot) on Oct 21, 2004 at 09:27 UTC

    I don't experience that gotcha with a modern perl.

    However, a nicer fix than too many backslashes strewn in the data would be not to interpolate the Here-doc:
        print <<'HTML';

    Look again at jZed's post or ikegami's last point.

    Cheers, Sören

Re^2: quotes in Perl
by nedals (Deacon) on Oct 22, 2004 at 01:06 UTC

    You wish to create an HTML doc using <<HTML; that requires interpolation.

    An @import (style sheet) or email address may be included. If the '@' symbol is not escaped, an error message will be returned that refers ONLY to the first line of the here-is

    Global symbol "@import" requires explicit package name at /usr/local/a +pache/..... line 100. Execution of /usr/local/apache/.... aborted due to compilation errors.

    Knowing the above helps to quickly locate the problem. (or avoid it)

    Just a item to add to your
    ...some notes to keep in mind:...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://401076]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2015-07-04 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls