Help for this page

Select Code to Download


  1. or download this
    use strict; 
    my $url         = "http://www.foo.bar/blort/quux.html";
    my $req         = HTTP::Request->new(HEAD=>$url);
    ...
    my $resp        = $ua->request($req);
    my $type        = $resp->header('Content-Type');
    my $status_line = $resp->status_line;
    
  2. or download this
    use strict; 
    my $url         = "http://www.foo.bar/blort/quux.html";
    my $safeurl     = uri_escape($url);
    ...
    print "URL.....: $url\n";
    print "Safe URL: $safeurl\n";
    print "New URL.: $newurl\n";