my @ret=(); for ( @$table ) { next unless $_->{VALUE} eq $wanted; @ret = @$_{VALUE, ADDRESS} } return @ret;