Your "AOH" scheme apears here in various guises time and time again form people who have never programmed before and is immediately jumped on by wiser heads who suggest this alternate scheme:
my @records;
while (<$inData) {
my ($name, $age) = split ',';
push @records, {name => $name, age => $age};
}
However, what the OP was asking about was a hash of arrays (HOA) so your scheme doesn't even help the OP.
True laziness is hard work
|