in reply to Pattern matching across an array
my @array = qw(A B C D E); join('|', @array) =~ /\A(\|?ABCDE\|?)+\z/g or warn "Validation failure +\n";
Untested, as always. You'll have to choose the seperator char carefuly, of course. Note that the quantifier ? after each \| is important to handle the case of the start and end of the string.
Update: Added /g modifier.
----
Invent a rounder wheel.
|
|---|