daily pastebin goal
56%
SHARE
TWEET

uriparse.pl

a guest Aug 29th, 2011 3,338 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top