Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Using URI::URL to determine resources within a site

by mifflin (Curate)
on Aug 04, 2004 at 05:24 UTC ( [id://379904]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use URI;
    $u1 = URI->new('http://www.comp.leeds.ac.uk/Perl/');
    ...
    else {
       print "oops\n";
    }
    
  2. or download this
    u1.host=www.comp.leeds.ac.uk
    u2.host=www.comp.leeds.ac.uk
    URL's host are the same
    
  3. 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.
    
  4. or download this
    use URI;
    $u1 = URI->new('http://www.comp.Leeds.ac.uk/Perl/')->canonical();
    ...
    else {
       print "oops\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-19 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found