Automating A Perl Script over a database

Dear Scripting Gods

I've never done shell scripting before and have only recently got to grips with Perl, so apologies for my naivity. I've written a perl program which takes in two files as arguments (these are text documents which take in the information I need) The perl program spits out a number, I need to automate this process so it automatically selects the two files for the Perl program in a large database (which consists of these two sets of files), runs the Perl program and saves the result in an array of some sort?! any code, pointers or advice would be very much appreciated! many thanks in advance!

best wishes

Dan

What you are trying to achieve is indeed not new. The implementation is dependent on the database you will be using. Your question is however very general and google would be good starting point.