On 05/14/2018 02:42 AM, JJ Merelo wrote:
Maybe this will work
use HTTP::UserAgent;
my $ua = HTTP::UserAgent.new;
$ua.timeout = 10;
my $response = $ua.get("https://ftp.mozilla.org/pub/firefox/releases/");
if $response.is-success {
say $response.content ~~ m:g{\> (\d+ \. .+?) \/};
}
Hi JJ,
Thank you for the regex! There are 1001 way to do things
in Perl!
I tested HTTP::UserAgent months ago. I don't remember exactly
what did not work right, but I wound up writing myself
a module to interface with "curl", where there are no issues
with redirects, user agent stings, cookies, and such.
My curl module also allows me to send eMail, including SSL
and one attachment.
The one drawback of Perl 6 over Perl 5 is the lack of
mature module support, but things are always improving!
:-)
-T