Compare two CSV files, create diff CSV and sent report by mail
€8-30 EUR
Completed
Posted about 8 years ago
€8-30 EUR
Paid on delivery
Hello, I would like to request support for creating a Perl script that will:
- compare two CSV files for a difference between two fields, and create a CSV file with differences
- create and sent a html mail for reporting the differences
Original file sizes: (example files attached)
File1: around 60 KB
File2: around 34 MB
Required actions:
- Script will read all records from [login to view URL], and check for matches between "model" and "ARTIKEL_ID" field from File2.csv.
- The "model" field from [login to view URL] should be 6 characters/digits. (double quotes excluded)
- If match is found, script will check the "price" field from [login to view URL] and compare this with the PRIJS_1 field from [login to view URL] (euro character/space from [login to view URL] should be ignored)
- when price fields for a record are NOT matching, a line should be added to a [login to view URL] file in format: MODEL,PRIJS_1 (price from [login to view URL]), price (price from [login to view URL])
- Once all records have been verified, a report/mail should be created based on the records that were found with the script. (different prices). The report should contain the following data:
MODEL (6 digits), OMSCHRIJVING (description from [login to view URL]), PRICE (from [login to view URL]), PRIJS_1 (From [login to view URL])