Help for this page

Select Code to Download


  1. or download this
    my $file_map = $mech->saveResources_future(
        target_file => 'this_page.html',
        target_dir  => 'this_page_files/',
        wanted      => sub { $_[0]->{url} =~ m!^https?:!i },
    )->get();
    
  2. or download this
    $names{ $resource->{url} } ||= File::Spec->catfile( $target_dir, $name
    +s{ $resource->{url} });
    my $target = $names{ $resource->{url} }
    ...
    binmode $fh;
    print $fh $resource->{content};
    CORE::close( $fh );