my $mech = WWW::Mechanize->new; $mech->get($url); $mech->get( $mech->find_link(text=>$file)->url, ":content_file"=>"$local_file" );