atcroft has the right idea. I had a simlar project and used databases for the following reasons:

  1. Most databases have built in security, like only allowing certain IP addresses to access only certain usernames, and allow only certain usernames to access and/or change certain portions of the site. That's a lot of stuff that would take forever to write out in Perl but is there and ready for the taking.
  2. Databases are fast and support multiple concurrenct connections. Files are slow and you can have race conditions if someone is trying to modify a file while it is being read. (Not to mention that you don't need to worry about things like file locks, etc.)
  3. Not all users are sys admins. Giving FTP access to a directory your scripts live in and telling them to upload files is asking for trouble.
  4. Regarding the last one, it's pretty easy to create a Tk or GTK based client to connect to the database and do everything transparently.
  5. Regarding the last one, if you use CSS on your site you can even allow your users to change things at will. You can also have sections formatted using class="" attributes, i.e. user inputs 5 paragraphs, perl splits the paragraphs on m/\n\n/, (remember to s/\r//sg), the CGI script you write outputs them as <p class="sectionFoo">content</p>, and it will look nice because the CSS tells the browser what to do for each class sectionFoo
  6. It's much easier to understand whats what when your directories aren't crowded by random text files.

In reply to Re: Re: Server Side Includes by Vautrin
in thread Server Side Includes by perleager

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.