in reply to extract a hostname from a fqdn

/^ ([^.]+) (?:\.(.+))? $/x; say "Host: `$1', domain: `$2'";