in reply to Removing File Extensions

You can also use substitution to build the log filename.

$logfile = $file; $logfile =~ s/\.asc$/.log/;
Or maybe you already have a regex to determine if you have a valid ascii filename:
if ($file =~ m{(.*)\.asc}) { $logfile = "$1.log"; }

YuckFoo