Just a variant that takes the rules of the original question a little more literally and strictly ...
use strict; use warnings; my $abc = "AABCBAABCCCCAB"; my $ab = "AABABAABABABAB"; $abc =~ s/C/[AB]/g; $abc = qr/^$abc$/; print "They match!\n" if $ab =~ $abc;
In reply to Re^2: Tri state string compare?
by mr_ron
in thread Tri state string compare? (Solved! see update2)
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |