Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Review this HTML-generating code

by tadman (Prior)
on Apr 20, 2001 at 08:47 UTC ( [id://74083]=note: print w/replies, xml ) Need Help??


in reply to Review this HTML-generating code

I agree with jepri's comments about not re-inventing the wheel, but when you're forced to, you might as well use a few tricks to make your life easier.

In particular, when writing HTML, you can use single-quotes instead of double-quotes. Such as:     print "<A HREF='http://www.perlmonks.org'>Perl Monks</A>\n"; This will save you the agony of having to escape every double quote instance, which can add up to a lot of pain for large files.

Replies are listed 'Best First'.
Re: Re: Review this HTML-generating code
by ChemBoy (Priest) on Apr 20, 2001 at 19:21 UTC

    Or you can use qq{}, which allows interpolation but lets you use unescaped doublequotes. I'd go for using that all around instead of using single-quotes half the time.



    If God had meant us to fly, he would *never* have give us the railroads.
        --Michael Flanders

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-24 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found