Please forgive me for being mildly off-topic, but I thought I might suggest an alternative for the way you're creating your search() query (using an array). I'm assuming that you're going to be opening a db connect(), running a query for matches, and returning the positives. A lot of people will tell you to let the db perform the heavy work for you. Depending on the size of the table, they may or may not be right.
I recently completed a script to store logfile statistics into a MySQL db (who hasn't), and found that it's actually quicker for me to open the dbh, pull all of my data out (assuming I only need to search one field), and insert them as keys into a hash (null values). Hashes are incredible for handling massive amounts of similar data. Anyhoo, then you can perform a simple defined() or exists() on the hash keys for your search criteria (or some regex derivative thereof). My particular application dropped from a runtime of minutes, to just under 7 seconds (comparison/injection of approximately 12000 complex entries).
That said, it's just my $.02. I'm not an expert, it just happened to work well for me... it may not be applicable to your needs, but maybe it will in the future. :-)
Hashes are your friend
-fuzzyping
Comment on Re: Re: Re: Beginner OOP style question
Before doing something like this you might want to check the index structre on your database. I know this isn't really a Perl answer, but with larger data sets, such a massive scoop and throw into memory may not be a really good answer. Checking or creating an index on the key fields might be a better alternative, and more useful in the long run.