Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: searching in large file

by NetWallah (Canon)
on Jan 08, 2018 at 03:32 UTC ( [id://1206879]=note: print w/replies, xml ) Need Help??


in reply to Re^3: searching in large file
in thread searching in large file

Thank you, Cristoforo (++) for your excellent explanation.

I wanted to add that for point (2), in addition to escaping the content($_) (with \Q and \E), the line appends the alternation meta-chaacter (|).

This makes the regular expression search for ANY of the lines in the smallfile.
Note also the "chop" statement which deletes the extra "|" appended.

                We're living in a golden age. All you need is gold. -- D.W. Robertson.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-25 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found