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