in reply to Re: Storing large data structures on disk
in thread Storing large data structures on disk

Thank for the reply.

I followed your hint and read perlpacktut. Since my array is 2d and each row has a different number of values (columns), doesn't it mean it will require a lot of programming overhead defining the templates?

Also, I would prefer a generic method that will work for different data structures (e.g. hashes of ...).

I will continue on reading om pack and unpack and will appreciate any pointers for some examples to the use of the for the purposes I described.
  • Comment on Re^2: Storing large data structures on disk

Replies are listed 'Best First'.
Re^3: Storing large data structures on disk
by moritz (Cardinal) on Jun 01, 2010 at 07:55 UTC
    Since my array is 2d and each row has a different number of values (columns), doesn't it mean it will require a lot of programming overhead defining the templates?

    It can be as simple as representing each row by an integer, which holds the number of numbers in that row, and then the row in fixed with (for example always 4 byte per number).

    But that all depends on how flexible you want the data retrieval to be, how robust it must be etc.