Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How do you deal with HTML in Perl?

by cjf (Parson)
on Jul 25, 2002 at 01:01 UTC ( #185078=note: print w/ replies, xml ) Need Help??


in reply to How do you deal with HTML in Perl?

I use Here docs for anything small and templating systems for anything serious. I won't open up the CGI.pm shouldn't contain HTML generation code debate again (try a search if you're interested).

Update: As for making heredocs look better in your code, indenting really helps:

my $text = "Hello, World!"; print <<" EOF"; <html> <head> <title>Example</title> </head> <body> <p>$text</p> </body> </html> EOF

Just make sure to quote the proper amount of white space before the EOF marker (also use double quotes unless you don't want variable interpolation).


Comment on Re: How do you deal with HTML in Perl?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2015-07-30 14:34 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 (271 votes), past polls