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

running the script, looks like its trying to convert the code to numbers

Argument "1213|1204|1207" isn't numeric in addition (+) at newcheck.pl + line 12. Argument "\\b(" isn't numeric in addition (+) at newcheck.pl line 12. Argument ")\\b" isn't numeric in addition (+) at newcheck.pl line 12.

Replies are listed 'Best First'.
Re^5: Bolt on where a match is not found to a print script
by AnomalousMonk (Archbishop) on Dec 05, 2017 at 16:08 UTC
    ... looks like its trying to convert the code to numbers

    That's because addition is a numeric operation.


    Give a man a fish:  <%-{-{-{-<

Re^5: Bolt on where a match is not found to a print script
by QM (Parson) on Dec 06, 2017 at 11:59 UTC
    Ack, too much Python lately, apologies.
    my $regex = '\b(?:' . join('|', @nums) . ')\b';

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      tried this one, when one of the numbers is matched in a file it keeps printing it over and over on the screen .. so the script never finishes