And properly speaking, the ones that don't support multiple bits should be $test->(2) && $test->(5) && $test->(8). Also not sure why you are using anonymous subs in the code to test.ysth => sub { my $s = "1010101011"; my $test = sub { (" $s") =~ /^@{[map "(?=.{$_}(?:01|10))" +,@_]}/ +x }; $test->(2,5,8); }
In reply to Re: Re: fast bit twiddling
by ysth
in thread fast bit twiddling
by spurperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |