in reply to Nested Data Structure Problems

That code isn't really building an array of hashes. @rec is an array, and $thisrecord is a reference to it. So you're really building an array of arrays, each array containing possibly a single item which is a hash ref?

You probably want something more like:

my %rec = {LastName=>$result[1], FirstName=>$result[2], TimeIn=>$res +ult[3], TimeOUT=>$result[4]}; my $thisrecord = \%rec;
But, you could avoid those temporary variables altogether by just doing:

push @{$ID{$result[0]}}, {LastName=>$result[1], FirstName=>$result[2 +], TimeIN=>$result[3], TimeOUT=>$result[4]};
use Disclaimer::Standard; # the code above is untested and may contain errors

Alan

Replies are listed 'Best First'.
RE: RE: Nested Data Structure Problems
by mrmick (Curate) on Jul 27, 2000 at 20:57 UTC
    Thanks, guys.... These solutions really helped a bunch! I can start working on my solution now that I understand what went wrong.

    Sheepishly,

    Mick