#!/usr/bin/perl use strict; use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; use Data::Dump; use 5.016; my $mech = WWW::Mechanize::Chrome->new(); my $url = 'https://code.google.com/archive/p/dotnetperls-controls/downloads'; $mech->get($url); print $_->text . "\n" for $mech->find_all_links( text_regex => qr/enable/i ); $mech->follow_link( xpath => '//a[text() = "enable1.txt"]' ); my @words; # check the outcome if ($mech->success) { #print $res->decoded_content; #@words = mech->decoded_content; print "Yay\n"; } else { print "Error: " . $mech->status . "\n"; } if (@words) { print "@words\n"; } sleep 1;