in reply to pattern match or key problem

Concerning matching within a file: does this help?
open(FILE, "your.log"); # read each line from the file while ($line = <FILE>) { if ($line =~ m/the pattern you're looking for/) { # do something with the matched line } }

If that's not what you meant and is something you already know, please clarify.

As for handling time ranges, there's a number of existing nodes here that can give you some help; the search box and Super Search are a monk's best friends. In particular, check out the responses to Within A Date Time Range.

-- Frag.