in reply to Scanning a text file

You might be able to start by setting the input record separator, $/ to %%%\n. Then you're at least working with one record at a time. From that point, split it into fields, and subsequently split the fields into keys and values. You can split into fields by splitting on /\n/, it seems. You can split into keys and values by splitting on /:\s/.

Then check your search criteria against the appropriate fields. Your next step would be to push the entire record into an array if it matches all of the search criteria.

This, of course, is just one possibility. If you have specific issues trying to implement something like this follow up here with code-related questions that we can sink our teeth into.


Dave