in reply to How do I search for every occurrence of strings within an array and display them?

Thank you for updating to properly format the code. Preliminary inspection reveals a few problems:

You might want to break the problem apart: hard-code the  @values array with some keywords and then get the Skype file read-and-scan operation right, then go back and attack the keyword read-parse-prepare part. (From a quick glance, I would say that the Skype file read-scan is very close to working. Oops: except that you are looping over the keyword file line array  @data instead of the extracted keywords  @values array. Better variable naming (e.g., @keywords instead of @values) might have prevented this. Also: improper index offset comparison spotted by johngg.)

Update: Added section on multi-line keword file.