#!/usr/bin/env perl use strict; use warnings; use File::Fetch; use Test::More tests => 1; my $url = 'https://www.perlmonks.org/?part=1;displaytype=displaycode;node_id=11145569;abspart=1'; my $ff = File::Fetch->new (uri => $url); my $loc = $ff->fetch (to => '/tmp/'); ok -f $loc, "Downloaded file to $loc";