Help for this page

Select Code to Download


  1. or download this
    #an FTP get
    my $ua;
    ...
    $ua->agent("$0/0.1 ".$ua->agent);
    my $req = HTTP::Request->new(GET => "$url");
    my $result = $ua->request($req);
    
  2. or download this
    #an FTP put
    #open the file and read the contents
    ...
    $ua->agent("$0/0.1 ".$ua->agent);
    my $req = HTTP::Request->new('PUT',"$url",undef,"$content");
    my $result = $ua->request($req);