my ($qname = "_sip._udp.www.google.com") =~ s/(.*\.)(www.*)/; ($qname, my $qname1) = ($1, $2);