in reply to Persistent data storage

I find SQLite database-files to be extremely useful in this sort of situation.   They are, as I said, files, and SQLite is a public domain(!) format that is used on everything everywhere.   You can store and retrieve your data using DBI, having encoded and decoded the data using something like JSON or Storable.   You also have the full power of SQL queries at your disposal, which is often very convenient for organizing the data, for keeping the results of multiple runs, for potentially using the data with applications other than Perl, and so forth.   (The one gotcha that you do need to know about SQLite is that you need to wrap database operations in a transaction, because otherwise, by design, it reads-and-verifies every disk write.   Physical disk-writes for transactions are usually deferred, “lazily,” until the transaction ends.)

I suggest this as a “better-all-around in the long run” approach to your problem that has worked very well for me.