or download this
PARSING URIs WITH REGEXP
As an alternative to this module, the following (official) regular exp
+ression can be used to decode a URI:
...
my($scheme, $authority, $path, $query, $fragment) =
$uri =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#
+(.*))?|;
The URI::Split module provide the function uri_split() as a readable a
+lternative.