I've written something similar to what you are suggesting for my own site (linked from my homenode).

I used flatfiles for the first version and I am currently in the process of switching over to a mySQL setup. If at all possibile, I would suggest using a database of some kind. This would allow you so much more flexability down the road and perhaps some performance boosts too but that depends on the traffic really.

With either a database or a flatfile arrangement, a single perl script that handles the html (much like the index.pl here) would make changes to the look of the site and maintance *much* easier and quicker.

As for new sections, in a sql enviroment you could have a column that states the type of page like comment, story, userid etc and dump data into that. If you use flatfiles, then I would just put the data (the meat, not the whole page) in a file in a directory that only new stories go in or use a proprietary extention.

you really should look at HTML::Template and CGI. HTML::Template would make it easier for a non-perl person to maintain the html and CGI just makes CGI easy. there is a HTML::Template tutorial here and Lincoln Stein's tutorials here.

The most important thing to do is to plan out where things are going to be and how they will look to the user and stick with that. I made it an everchanging process as I went and it took forever because the changes I made meant a re-write of the code.

Good luck and feel free to msg me if you like.
-p


In reply to Re: Creating new HTML files and accessing them later. by thatguy
in thread Creating new HTML files and accessing them later. by bladx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.