foreach (@tmp) { push @hosts, $1 if /^([\w.]+)$/; }