develooper Front page | perl.perl6.users | Postings from June 2018

Re: need second pair of eyes

Thread Previous | Thread Next
From:
Brandon Allbery
Date:
June 12, 2018 22:47
Subject:
Re: need second pair of eyes
Message ID:
CAKFCL4UesR0mXL=ktHxyP7g13CiOJZCUkszrnWrJPF1GhAfzsQ@mail.gmail.com
I don't expect

      if $Line ~~ | "wine-patched/archive/staging-/"   &&   ".tar.gz " |

does what you expect. In fact, I'm not sure what you expect there; those
|-s are going to be taken as slip prefix operators, and the second one
indeed will gobble the following block as the expression it applies to.

On Tue, Jun 12, 2018 at 6:42 PM ToddAndMargo <ToddAndMargo@zoho.com> wrote:

> Hi Alk,
>
> What am I dong wrong here?
>
>
> $ p6 'my $Line = "wine-patched/archive/staging-/xxxxx.tar.gz"; if $Line
> ~~ | "wine-patched/archive/staging-/"   &&   ".tar.gz " |  {say "yes"}
> else {say "no};'
>
> ===SORRY!===
> Expression needs parens to avoid gobbling block
> at -e:1
> ------> ging-/"   &&   ".tar.gz " |  {say "yes"}⏏ else {say "no};
> Missing block (apparently claimed by expression)
> at -e:1
> ------> ging-/"   &&   ".tar.gz " |  {say "yes"}⏏ else {say "no};
>
>
> :'(
>
> -T
>


-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About