http://www.perlmonks.org?node_id=452812


in reply to Perfecting index.pl some more!

Just out of curiosity, what are your reasons for storing some of the data in a database and some in text files?

I've most (99%) of mine stored in the database so that manipulating the data is almost always done through the database (MySQL).

Like eXile, I really think you should move the html part out of your code. Put it in a template. I'm using HTML::Template and I'm happy ever after.

Replies are listed 'Best First'.
Re^2: Perfecting index.pl some more!
by Nik (Initiate) on Apr 30, 2005 at 08:14 UTC
    I see!
    Well all of the user_sumbmitted variables i store them in mysql tables as well as almost any other kinf of information except the passages itself where i store them in palin text files

    I never actyally thought that i can store the whole content of a buch of files into database tables as well.
    Seems a nice idea(dotn know why though maybe of amatetr of having it all together) but how will i load the files there and most inquiry how is that going to help me?its very simple having its passage the user selects to see in its own file

    If its better the way you tell me i'll be happy to do it!
      I would move the passages to the database as well. That way, I've a consistent way of adding, editing and deleting the passages. And once in a proper database, you can add other functionalities like search capabilities. Of course, you can accomplish the search capability with text files but it's more work.