via => { my $p = (grep { $_->{primary} } @$_)[0]; $p = {%$p}; # macht aus $p eine normale HashRef return $p; }