Help for this page

Select Code to Download


  1. or download this
    my $x;
    ...
    $x = ...;
    
  2. or download this
    ...
    my $x = ...;
    
  3. or download this
    open(my $fh, '>', '/tmp/data.txt')
        or die("Can't create file /tmp/data.txt: $!\n");
    print $fh $res->content;
    close($fh);
    
  4. or download this
    my $req = HTTP::Request->new(GET =>'http://SOMEURLHERE');
    my $res = $ua->request($req);
    
  5. or download this
    my $res = $ua->get('http://SOMEURLHERE');