You open the master file and read it i line by line. See readline. Extract the employee ID either splitting the line into an array (see perldata), or via a regular expression. Insert the employee ID as key and the current line as value into a hash table (again, see perldata). Close the master file after the reading loop.
Read the contents of the directory containing the 8 other files with opendir and readdir into an array. Loop over that array, and for each file: open the file in reading mode; open the respective output file with another file handle in writing mode; while reading each file, extract the employee ID off the current line as above, look up its value in the previous built hash table; if found, output that line , if not, the current line, to the output file handle; close both files after the inner reading loop.
If you have problems with any of the above, come back with the respective code.
In reply to Re: CSV files compare
by shmem
in thread CSV files compare
by PERL_fresher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |