in reply to How to use matched strings

Are the files you are reading formatted in Excel? If so, you may want to consider using the module Spreadsheet::ParseExcel

It would be much more helpful to see any code you have written so far. Please post what you have.