in reply to To learn to search flat files or to cheat...

There are times to invent, or even re-invent wheels, but there are also times to learn how to fit an existing wheel to your wagon. There are a lot of existing wheels that fit this particular wagon and they are worth learning about almost as much as regexen.

A deciding criteria however may be that, while a ton of questions get asked here about how to apply regexen in various ways, many fewer questions arrise about using various DB techniques. If it is learning you want to do, browse the regexen questions here (and try to answer them without looking at the other answers in the first instance) to learn regexen. But open the DB can of worms to solve this particular problem. There are a number of data base modules that may be of interest, DBD::CSV obviously, but also DBD::SQLite and DBM::Deep are worth looking at for other ways to do it.

Both approaches involve learning stuff that will be bound to come in handy in the future, but regexen you should have plenty of opportunities to learn about. Finding excuses to learn DB techniques are a little rarer.


DWIM is Perl's answer to Gödel
  • Comment on Re: To learn to search flat files or to cheat...

Replies are listed 'Best First'.
Re^2: To learn to search flat files or to cheat...
by stonecolddevin (Parson) on Nov 09, 2006 at 18:56 UTC

    That's an interesting take on this GrandFather. I really appreciate that insight on this. I think, in essense, a DBD module is going to win out over any hand coded flat file indexing/searching etc., because you're still handling the flat file when using the DBD module, you're just doing it in a better and most likely more efficient way.

    ++Kudos to you GrandFather :-)

    meh.