in reply to Re^2: Which Permute or other module can give me all possible subsets of 6 numbers out of 40?
in thread Which Permute or other module can give me all possible subsets of 6 numbers out of 40?

Because the print returns 1, and we need the (??{...}) block to return something that does not match, to cause the regex engine to backtrack.

  • Comment on Re^3: Which Permute or other module can give me all possible subsets of 6 numbers out of 40?

Replies are listed 'Best First'.
Re^4: Which Permute or other module can give me all possible subsets of 6 numbers out of 40?
by choroba (Cardinal) on Apr 11, 2018 at 13:33 UTC
    Of course! I was blind. I solved a similar issue years ago, but I used the FAIL as I couldn't choose what characters would be involved. Here, it would be (note that (?{}) is used):
    ($digit x $from) =~ /^$pattern(?{print "@+[1 .. $draw]\n"})(?!)/;
    And it works for $digit = 1, too.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,