in reply to Log parsing question

Globs can help you with your file name problem: perl -e '....' ~/logs/*/20080917.log

The file name that is currently being processed is then stored in $ARGV, which should solve your second problem.