On 06/12/2018 03:41 PM, ToddAndMargo 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
This fixed it:
$ p6 'my $Line = "wine-patched/archive/staging-/xxxxx.tar.gz";if $Line
~~ / "wine-patched\/archive\/staging\-\/" / & / ".tar.gz" / {say "yes"}
else {say "no"};'
How do I use "|" instead of "/"? I am trying to rid myself of the
/\/\//\//\\/\/ tree