in reply to Is this a reasonable data structure?
my @alldata (%caralo_l, %androno_j, %paterman_s);
...
Question: Is this really an array of hashes?
Well, hardburn almost had it. It's actually just an array. Perl will flatten your hashes. If you wrote it as
you would have an array of hashes.my @alldata = (\%caralo_l, \%androno_j, \%paterman_s);
It seems to me kind of a waste to repeat the KEY information in each hash, but I haven’t thought up a better way.
Yes, it is a waste. You might consider just using an array of arrays and then keeping a hash where the keys are your column names and the values are their indexes in the array.
Edit: Added the missing '=' in the assignment. I didn't notice its absence, at first, after cutting and pasting it from the OP.
-sauoq "My two cents aren't worth a dime.";
|
|---|