Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Assembling text into websites

by oko1 (Deacon)
on Oct 24, 2008 at 00:04 UTC ( #719205=note: print w/replies, xml ) Need Help??


in reply to Assembling text into websites

To follow up to what scorpio17 said, I use HTML::Template to generate several of the pages at http://linuxgazette.net that way, for various reasons. The generator script can be run as CGI or to create output to a static file. Quoting the relevant section:

# Output everything including the header if invoked as a CGI script if ( $0 =~ /\.cgi$/ ){ print header; $fh = *STDOUT; } else { # If invoked via symlink (not ending in ".cgi"), write "mirrors.ht +ml" open Mirr, ">mirrors.html" or die "Can't open mirrors.html: $!\n"; $fh = *Mirr; } # print $fh start_html( "Linux Gazette - Mirrors and translations page +" ), $t -> output, end_html; print $fh $t -> output, end_html;

It works well (the result is at http://linuxgazette.net/mirrors.html), and has for the last five years. A fair track record. :)


--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2020-04-05 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (34 votes). Check out past polls.

    Notices?