Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Bolt on where a match is not found to a print script

by Anonymous Monk
on Dec 05, 2017 at 15:09 UTC ( [id://1204966]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1204966]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-19 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found