How to search for a substring in a file with many lines.

Asked By 0 points N/A Posted on -
qa-featured

I have a set of strings and i want to list all the file lines which start with any of the substrings in the list. i am running perl 5.10.1 and i do not have CPAN support to install additional modules in the grounds of easy approach. The string length is limited to 10 characters. I have solution to find out the string which matches with the hash values but not the other way around. I want to know the line number in the file where the match exists, the string which matched with the line both captured efficiently. I have written a code already which does this but the code is very inefficient and slow.

SHARE

Related Questions