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?
In reply to Re: Array of Hashes
by japhy
in thread Array of Hashes
by ramya2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |