in reply to how to grep from a log file

You can refer to your own post grep all matches for the correct syntax (as well as the documentation, of course). Also, you'll need to actually read the lines from the file, as you appear to be doing in that post with your utils::getFileContents() function. See also "Files and I/O" in perlintro.