I'm guessing from the variable name and the use of quoting constructs that the OP grabbed that bit of code from one of my solutions, probably one where @items contained values known not to need quotemeta'ing. Invariable application of quotemeta without any consideration of whether it is necessary is just another form of cargo cult programming. I don't think we can tell from the OP's code whether it is required or not. Even if it is required, the do block construct is as valid as using join.
my $rxMatchItems = do { local $" = q{|}; qr{(?:@{ [ map quotemeta, @items ] })}; };
Cheers,
JohnGG
In reply to Re^3: Large File Parsing
by johngg
in thread Large File Parsing
by RobertCraven
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |