I am trying to find an easy way to match any of the words. I am using a for loop, but is there an easier way?
my @a=<abcde f>; my $x="a1234567"; say $x ~~ m/ @a.any /;
It returns False. Is there any way to make it work? Thanks.
my @a = <abcde f>; my $x = "a1234567"; say $x ~~ /@a/;
/@a/ matches /| @a/ /| @a/ , which is the longest rotation. For alternation you can use /|| @a/ /|| @a/ .
/@a/
/| @a/
/|| @a/
Source: https://habr.com/ru/post/1262113/More articles:Cannot start .Net Core based on project.json after installing VS 2017 - asp.net-coreSet UIViewController view property to custom UIView class without storyboard / tip - iosFiltering by args in Stored Proc - sqlHow to fix mno cygwin error? - gcc'avro.schema' module does not have the 'parse' attribute - pythonIs it safe to read a function pointer at the same time without locking? - concurrencyAccess DynamoDB from iOS SDK on AWS with C target - iosWrong sync in go lang - multithreadingHow to create an umbrella structure, subframe error - iosUsing StyleCop in Core Asp.net - stylecopAll Articles