Help for this page
my $rx = qr/ ([abcd]) # a, b, c, or d -- stored in \1 ... (?!\1|\2|\3) # next thing not \1, \2, or \3 [abcd] # you get the idea /x;
use List::Util qw( shuffle ); use Test::More; ... my $s = join q{}, shuffle 0 .. 9, qw( a b c d ); ok( $s =~ $rx, "match '$s'" ); }