in reply to Using Perl6::Junction for searching a element in a array
I changed the code a lot because I couldn't find a simple adjustment to get the OP to do this.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 # ... }
-M
Free your mind
|
|---|