my $domain_ip = (grep {$_->[0] == $domainid} @$table)[0]->[2];