in reply to Matching hashes

When you say "match the keys", do you mean that you look for occurrences of identical keys? Or are you looking for substrings?

If it is the former, you should read one line at a time, split it, and store it in a hash. (No need to the store the whole file in memory).

And the you read the second file line by line, consulting your hash for each of them.

An entirely different solution is to view them as database tables, and use DBI together with DBD::CSV and do a join on the tables.

Replies are listed 'Best First'.
Re^2: Matching hashes
by ada (Novice) on Dec 05, 2007 at 17:58 UTC
    My word that was quick! Thanks.. Yes I am looking for occurrences of identical keys.. so the first method u impose would be to store everything in an array first then split it according to the values I am after in a regex then storing into a hash? The second method looks daunting I am rather a novice! Ada