use strict;
use warnings;
my $tr="
" . ("(.*?) | "x8) . "
";
while () {
my @x = m/\G$tr/cgo or next;
print join("|", @x), "\n";
}
__DATA__
I | am | Santa | Clause | I | am | Santa | Clause |
Blah Blah This Will Not Match
I | am | Easter | Bunny | I | am | Easter | Bunny |
Neither | Will | This |