Some of my programs consist of two parts. First, they read large data from files and transform it, producing Array
s, Hash
es, Object
s etc.; second, they analyse this data with (always different) user-defined conditions. The first part remains the same (as long as the source data isn't changed), but sometimes it takes considerable time to work every time I run the program, and I usually have to run it many times with the same source data. It would be much better to have two programs — one of them (once) reads the data and transforms it, while the other analyses it (many times).
My question is: what's the best way to store those Array
s, Hash
es and Object
s, so that the first program writes them to a file and the second one reads them from that file?