my $path = 'C:/Users/Documents/Traning'; my $filename = $path.'/Perl/XiServiceList.txt'; my $logfile = $path."/dailycheck_$date.log"; . . open MYFILE, ">>", $logfile;