Guest User

uriparse.pl

a guest
Aug 29th, 2011
3,507
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. use URI;
  7.  
  8. my $uri = URI->new('http://microformats.org:80/wiki/index.php?title=url-formats#Why');
  9.  
  10. print 'scheme: ',       $uri->scheme,       "\n";
  11. print 'opaque: ',       $uri->opaque,       "\n";
  12. print 'host_port: ',    $uri->host_port,    "\n";
  13. print 'host: ',         $uri->host,         "\n";
  14. print 'port: ',         $uri->port,         "\n";
  15. print 'path: ',         $uri->path,         "\n";
  16. print 'fragment: ',     $uri->fragment,     "\n";
  17.  
  18. print 'authority: ',    $uri->authority,    "\n";
  19. print 'query: ',        $uri->query,        "\n";
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×