Thanks for your help. The problem is that there are 100's of stored procs called through VBScript to be run through scheduler and they fail every other day. So I am to get the same thing done through perl script which will be then put on the scheduler. This being the reason I am doing it in perl. Now as you have mentioned Hash...how will that be useful. Do you mean to say that I should declare a hash and depending on the arguments passed those arguments will get assigned as values to the respective keys. If that done then how will that change the database execution part. Please advice. I am in the learning phase of perl and so the small silly questions.