in reply to Compare 2 csv files using a key set of colums
It might also save some memory and speed to use $hash1->{$key} = undef because all you ever do with the hash1 and hash2 data is check for existence of keys.
It would be helpful to the potential user to be more clear about what exactly the "comparison" consists of, since there are many ways of comparing two csv files, and this script only addresses one way (print any record that contains a "key" value unique to either input file, i.e. not common to both files).
Some users might also like to know (by means of a description in pod, for example) what the limitations are for the code as written: there's no checking for repeated "keys" within a single file, and no checking whether a "common" key has same or different data in other fields in the two files.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Compare 2 csv files using a key set of colums
by eric256 (Parson) on Dec 19, 2005 at 16:05 UTC |