SPUG: domain from URL (was: better way?)

El JoPe Magnifico jope-spug at n2h2.com
Tue Aug 10 16:32:18 CDT 1999


>> Better way to get just the domain from referer?
[...]
> my ($dom) = (referer() =~ m{//([^/]+)/};

Typo: Forgot your trailing parenthesis (just before the semicolon).

Also, a clarification on th original question:
Do you want the fully qualified hostname (host + domain),
or just the _domain_?  Everyone so far has done just the former.
-jp




 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list