Hi,
I have an array with anonymous hash references like the following:
$foo = [
{
name = value,
id = value,
},
{
name = value,
id = value,
}
];
Iterating through the hash references works with:
foreach $item (@$foo) {
do something with $item->name;
}
What I like to do, is to check for the existence of a given key/value
pair in any of the hash-references, eg. for name=bar.
When I understood it right, the exists function only checks if a given
hash element has been initialized, but it doesn't check of a specific
value.
Any ideas?!
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/