in reply to Using Perl6::Junction for searching a element in a array

The code above explains the output perfectly. I think you really mean something more like:
while(<F1>) my $ok = 0; for my $tag ( @tags ) $ok = /^\s*(\<$tag\>)(.*)$/ and last; } $ok or die "Incorrect entry $_"; # $1 is now the tag, $2 the rest of the line # ... }
I changed the code a lot because I couldn't find a simple adjustment to get the OP to do this.

-M

Free your mind