in reply to Wierd DB Question

You might be able to use DBD::Sprite and make this task easier and require less modification should you choose to move to an SQL database.
There is also the DBD::AnyData module that might help if DBD::Sprite doesn't.