in reply to Re: Comparing elements in Array of Hashes (AoH)
in thread Comparing elements in Array of Hashes (AoH)
for ( my $i = 0 ; $i <= $#{$aref_current_events} ; $i++ ) { for (my $j = 0 ; $j <= $#{$aref_previous_events} ; $j++ ) { if (( $aref_current_events->[$i]{'node'} eq "$aref_previous_events->[$j]{'node'}" ) && ($aref_current_events->[$i]{'link'} eq "$aref_previous_events->[$j]{'link'}" ) ) { print "$aref_current_events->[$i]{'load'} $aref_current_events->[$ +i]{'load'}\n"; } } }
|
|---|