Just another Perl shrine | |
PerlMonks |
Re^4: searching in large fileby NetWallah (Canon) |
on Jan 08, 2018 at 03:32 UTC ( [id://1206879]=note: print w/replies, xml ) | Need Help?? |
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. We're living in a golden age. All you need is gold. -- D.W. Robertson.
In Section
Seekers of Perl Wisdom
|
|