eclecticIO has asked for the wisdom of the Perl Monks concerning the following question:
use strict; foreach my $element1 (@array1) { foreach my $element2 (@array2) { foreach my $key (keys %{$element1}) { next if (%{$element1}->{$key} = %{$element2}->{$key}); ## OK Here's where the magic needs to happen. ## If there's a difference, I need the entire hash, %{$element1}, ## saved to the element of a new array with the "CHANGED" key in place } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Changing the keys of hashes in arrays
by tye (Sage) on Oct 06, 2000 at 07:50 UTC | |
|
RE: Changing the keys of hashes in arrays
by acid06 (Friar) on Oct 06, 2000 at 05:31 UTC | |
|
RE: Changing the keys of hashes in arrays
by extremely (Priest) on Oct 06, 2000 at 07:23 UTC | |
|
Re: Changing the keys of hashes in arrays
by eclecticIO (Beadle) on Oct 06, 2000 at 07:50 UTC |