Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Not sure what I am doing wrong

by f00li5h (Chaplain)
on Nov 24, 2008 at 15:02 UTC ( [id://725609]=note: print w/replies, xml ) Need Help??


in reply to Not sure what I am doing wrong

Update you can skip ths node if you've read Re: Not sure what I am doing wrong by massa

depending on the data, and what you're seaching for, you can make one pattern, by using

$regex = join '|', map quotemeta, @REC; print "I want $EACH_LINE" if $EACH_LINE =~ $regex

It will get you a pattern made up of all the lines in the file, joined by | which will match any of them

It may need anchoring if the lines are to match the full line instead

Also, the quotemeta presumes you just want literal strings (remove it if @REC contains regexen)

@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

Log In?
Username:
Password:

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

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

    No recent polls found