use Time::Piece;
# Get the base name of the script
( my $me = $0 ) =~ s{.*(\\|/)}{};
my $today = localtime->strftime('%d%m%Y');
#Set name of log file to that of script name
(my $logfile = $me ) =~ s/\.pl/\_$today\.log/ig;
# Get the base name of the script
( my $me = $0 ) =~ s{.*(\\|/)}{};
my $today = localtime->strftime('%d%m%Y');
#Set name of log file to that of script name
(my $logfile = $me ) =~ s/\.pl/\_$today\.log/ig;