in reply to "Generic" variables/Hash of hashes

the fastest would shurely be an Array of Arrays (aka 2-dimensional Array). you could also create a Hash of Arrays or an Array of Hashes, depending on how you want to manipulate the data.

1. what do you actualy want? what type on manipulation or processing will be done to the data?
2. what does your input data look like?

Replies are listed 'Best First'.
Re^2: "Generic" variables/Hash of hashes
by New Novice (Sexton) on Feb 14, 2005 at 12:51 UTC
    The data input consists mainly of strings and some dates. Ultimately I want to construct something like a storage inventory. The records that form the input (and should be printed in the first database in rows) give you delivery date, sales date, etc. and a description of the goods. The second database should then give me the number of certain goods per period, that means I would have to run through the records and check if there has been a delivery containing the goods and how much has been sold (think of sales as a negative delivery) up to a certain point, so that I can calculate the inventory for that particular time period.
      i think you should use an Array of Arrays. if you want more verbose code, you could use constants to store whitch row has what in it.

      you should read perlref and perllol.

      the main idea in perl data structures is, that you store a row in an array and store references to those arrays/rows in another array, so you get something that is usable as two dimensional array.