Re: Need help converting from Perl 5

2018-05-15 Thread JJ Merelo
As far as I understand it, HTTP::UserAgent is preferred over LWP::Simple. It does work to spec now, so I'm using it... El mar., 15 may. 2018 a las 8:44, ToddAndMargo () escribió: > On 05/14/2018 02:42 AM, JJ Merelo wrote: > > Maybe this will work > > > > use

Re: Need help converting from Perl 5

2018-05-15 Thread ToddAndMargo
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

Re: Need help converting from Perl 5

2018-05-14 Thread Shlomi Fish
Hi Todd, On Sun, 13 May 2018 22:07:59 -0700 ToddAndMargo wrote: > On 05/13/2018 09:41 PM, ToddAndMargo wrote: > > Hi All, > > > > I can't not remember what I did in Perl 5 here and > > am not having a good time converting it to Perl 6. > > > > $  perl -e 'my

Re: Need help converting from Perl 5

2018-05-14 Thread JJ Merelo
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+ \. .+?) \/}; } .. Please post also your question to

Re: Need help converting from Perl 5

2018-05-14 Thread ToddAndMargo
El lun., 14 may. 2018 a las 7:08, ToddAndMargo (>) escribió: On 05/13/2018 09:41 PM, ToddAndMargo wrote: > Hi All, > > I can't not remember what I did in Perl 5 here and > am not having a good time converting it to

Re: Need help converting from Perl 5

2018-05-13 Thread ToddAndMargo
On 05/13/2018 09:41 PM, ToddAndMargo wrote: Hi All, I can't not remember what I did in Perl 5 here and am not having a good time converting it to Perl 6. $  perl -e 'my $A="44.rc0"; if ($A ~~ /(^[0-9,.,a,b,rc]+$)/ ) {print "$1\n";} else {print "\$A = <$A>\n"}' 44.rc0 The actual code is: if

Need help converting from Perl 5

2018-05-13 Thread ToddAndMargo
Hi All, I can't not remember what I did in Perl 5 here and am not having a good time converting it to Perl 6. $ perl -e 'my $A="44.rc0"; if ($A ~~ /(^[0-9,.,a,b,rc]+$)/ ) {print "$1\n";} else {print "\$A = <$A>\n"}' 44.rc0 The actual code is: if ( $Line2 ~~ /(^[0-9,.]+$)/ ) { push (