in reply to Perl File-Test Operators

You'll want to chomp the $logfile within your foreach.

Update: It wouldn't hurt you to use strict, either.

Another Update: You might consider using File::Find to select the log files you want.


No good deed goes unpunished. -- (attributed to) Oscar Wilde