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.
In reply to Re^4: searching in large file
by NetWallah
in thread searching in large file
by sabas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |