in reply to Re^2: extracting elements by key from an array of hashes
in thread extracting elements by key from an array of hashes
my @aoh = ( {k0 => 'v0' } , {k1 => 'v1' } , {k2 => 'v2' } , {k3 => 'v3' } ); my ($val) = grep {exists $_->{k2}} @aoh; $val &&= $val->{k2};
|
|---|