in reply to Merging Data into one array
You don't specify if all your hashes will always be in the same order in each array ref. This example code below believes that they will be (which was kind of apparent in your code, but one never knows):
for (0..$#$data1){ if ($data1->[$_]{ACC} eq $data2->[$_]{ACC}){ push @all, { %{ $data1->[$_] }, %{ $data2->[$_] } }; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Merging Data into one array
by Anonymous Monk on Nov 30, 2015 at 20:43 UTC | |
by stevieb (Canon) on Nov 30, 2015 at 21:01 UTC |