m{^http://(.*?)/} #to m{^http://(.*?)(/.*)$} #### print $remote "GET $url HTTP/1.0\nHost: $host" . $BLANK;