$> perl -e '@array=({mykey=>foo}, {mykey=>bar}), @out = map{ $$elem{mykey} } @array; print @out;' $>