Suggest a bit of study before hacking into the jungle.
for example, you might wish to read about globs and the various date modules.
<GRIN>
As as for the objective in this part of your opening graph:
"...
grab the log with the date string greater than ... the current date..."
please read up on:
- PSI::xxx
- TIMEMACHINE:xxx....