Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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.

Replies are listed 'Best First'.
Re^2: quotes in Perl
by Happy-the-monk (Canon) 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:...
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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2020-05-29 14:59 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (169 votes). Check out past polls.