Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 (Monsignor) 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 lurking in the Monastery: (17)
As of 2014-12-18 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (57 votes), past polls