Hi, Although I've been dabling in Perl CGI scipting for a couple of years I'm still very much a novice (had to get a Monk pun into my first post)!

I'm looking for the simplest way to store contents and html page design in separate files. Here's what I'm thinking of doing and would appreciate comments on the sanity of the idea. I'm avoiding using any form of database or parsing of data when a web page is sent to the browser.

The contribute script will print a file to a specified directory with the data simply held as variables as they would be declared in a script.

$variable = "lots of text";

The "present to browser" script will decode the URL and covert this into directory and file to include variables.

$inc = #path to file to include

require "$inc";

Imediately all of the variables stored in that external file will be available to me without any fancy parsing.

In effect this will be similar to Blosxom but without the need to pars the external files. I can't figure why someone would convert variables to write out to a file only to have to parse them when they come back in. It seems like a complete waste of resources to me.

I don't need to be able to search or sort records users and editors will just navigate. Directory structure will be stored in a file containing just an array, one per directory. This will be added to as pages are added and reduced as they are deleted.

Am I completely mad or is this a good quick solution. Any comments or advice would be much appreciated.

Many thanks Sid


In reply to Simple Data storage by Hissingsid

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.