in reply to How to generate a report based on keyword?

There are lots of ways to do anything in any language. Of course there is a way to do things in perl.

Perhaps you need help with the basic logic flow? Break it up into simple steps:

  1. Step through the file one line at a time and apply regexes
  2. If you see a category change, remember that.
  3. If you see a resource is available, increment the tally for the current category. (Use a Hash, since categories are arbitrary strings, rather than sequential numbers)
  4. When done, print the totals.

  • Comment on Re: How to generate a report based on keyword?