my($host, $port) = /^Host:\s*([^:\s]+)(?:\:(\d+))?/i; $port = 80 if not defined $port;