in reply to Maintaining state in modules

You should look into Data::Dumper if you aren't a fan of it already. After I learned of its existence and how to use it, it solved any data persistence problems I ever had. You can even store instantiated objects and it will save their state for the next time. Once you work out a way to store the output(text file, in a database record, etc), you're all set.