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

Another cleaner variant that works with the initial data structure.
my @aoh = ( {k0 => 'v0' } , {k1 => 'v1' } , {k2 => 'v2' } , {k3 => 'v3' } ); my ($val) = grep {exists $_->{k2}} @aoh; $val &&= $val->{k2};