Help for this page

Select Code to Download


  1. or download this
    my $response = $mech->get($url);
    open my $output, '>:raw', '/tmp/output.jpg';
    print { $output } $response->decoded_content;
    
  2. or download this
    my $response = $mech->get($url);
    my $c = $mech->content; # Dummy request to initialize everything
    open my $output, '>:raw', '/tmp/output.jpg';
    print { $output } $response->decoded_content;