create a hash which has the keywords to watch for as its keys foreach file (probably using File::Find) do open file (error check) foreach line in file split the line into fields is the first field from this line in my hash of important keywords? if yes, are there empty or dash fields in this line? if yes, report this file (and keyword and/or line number, optionally) and move on to next file end of lines close file end of files