in reply to searching in large file

Hi,

Loading the 114 lines into a hash,then checking whether the lines in the 300k file are present in the hash will get you started.

J.C.

Replies are listed 'Best First'.
Re^2: searching in large file
by Laurent_R (Canon) on Jan 06, 2018 at 10:13 UTC
    What you suggest means that you are trying to figure out whether the lines of file 2 are in file 1. Although it is not entirely clear, the OP apparently was trying to know whether the lines of file 1 are in file 2. So, the other way around.

    So it's probably the second file that should be loaded into a hash (which is not a problem despite the second file being significantly larger, as it is not that large), and then one should lookup each line of file 1 in the hash.

    Update: actually, it is really not clear in which way the OP wants to search: at one point, it says one way, and at another point, it seems to say the other way around.