in reply to Re^3: Bolt on where a match is not found to a print script
in thread Bolt on where a match is not found to a print script
my $regex = '\b(' + join('|', @nums) + ')\b';
Still the whole addition/concatenation problem.
Also, moving the capture into $regex doesn't address multiple captures per line. This may not even be a possibility in the OPer's application (nothing is ever said about this), but I like to defend against things like this.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Bolt on where a match is not found to a print script
by QM (Parson) on Dec 06, 2017 at 12:07 UTC | |
by AnomalousMonk (Archbishop) on Dec 06, 2017 at 17:27 UTC | |
by QM (Parson) on Dec 07, 2017 at 16:57 UTC | |
by Anonymous Monk on Dec 06, 2017 at 16:54 UTC |