Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Extract Host, Logical Host from URL

by strat (Canon)
on Aug 15, 2007 at 05:48 UTC ( #632655=note: print w/replies, xml ) Need Help??


in reply to Extract Host, Logical Host from URL

see URI for parsing URIs. If you just want to get the "main" domain, you could try something like  join(".", ( split(/\./, $domains ) )[-2,-1] ) (if I understand you correctly)

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://632655]
help
Chatterbox?
and John Coltrane plays...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2016-12-04 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (64 votes). Check out past polls.