my @elements = grep { exists $_->{$captureId} } @outputFiles;
If you really want the index of the element, rather than the element itself, you can change the grep to:
my @indexes = grep { exists $outputFiles[$_]{$captureId} } 0..$#outputFiles;
In reply to Re: Array of Hashes
by friedo
in thread Array of Hashes
by ramya2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |