Advertisement
Guest User

uriparse.pl

a guest
Aug 29th, 2011
4,100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.60 KB | None | 0 0
  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";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement