push @results, first ...; @hash{ @list }= map { first {test($_)} candidates($_) } @list; use warnings; foo( { -option => first ... } );