Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How do you extract the server from a URL?

by Mr. Muskrat (Canon)
on May 23, 2003 at 17:30 UTC ( [id://260408]=note: print w/replies, xml ) Need Help??


in reply to How do you extract the server from a URL?

Use the URI module.

use URI; my $url = 'http://www.perlmonks.org/index.pl'; my $uri = URI->new($url); my $server = $uri->host; print "URL: $url\n"; print "Server: $server\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://260408]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-24 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found