in reply to Array of Hashes
My code gives you $wanted which IS the hash reference, rather than the index in the array. You'd print $wanted->{$captureId} and $wanted->{type}.my $wanted; for my $href (@outputFiles) { $wanted = $href, last if exists $href->{$captureId}; }
If you don't have duplicate hash keys, though, why are you using an array of hash refs?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array of Hashes
by ramya2005 (Scribe) on Sep 20, 2005 at 17:39 UTC | |
by graff (Chancellor) on Sep 20, 2005 at 18:07 UTC | |
|
Re^2: Array of Hashes
by Angel (Friar) on Sep 20, 2005 at 19:42 UTC |