in reply to Re: Extracting array of hashes from data
in thread Extracting array of hashes from data
push @{ $alldata{$key }, \%temphash
whoops, minor typo, big error; change the above line to this:
push @{$alldata{$key }}, \%temphash
or, you can try this:
$hash{$key} = \%temphash; # $hash{$key} is a reference to %temph +ash $hash{$hey} = \@array; # $hash{$key} is a reference to @array $hash{$key} = {KEY => 'value'}; #$hash{$key} is a reference to an anon +ymous hash $hash{$key} = [1,2,3]; #$hash[$key] is a reference to an anon +ymous array
Update:Cleaned up code formating a bit
The 15 year old, freshman programmer,
Stephen Rawls
In Section
Seekers of Perl Wisdom