Thanks for all the quick responses. I have had a look at DBM::Deep and it looks like it might be what I need. I will also get some practice in with Text::CSV etc. Funny how commenting out the line which ties the hash to a DB file makes the script work (with a couple of minor tweaks). Its easy to overlook simple checks when you have been working on the same problem all day :p