my $logFileName = $rootDIR . "/fmlog.txt"; open $OUTPUTFILE, "> $logFileName" or die "Died trying to open the output file $!"; # Processing files and logging results close ($OUTPUTFILE); # Open Log file for user system($logFileName); exit;