in reply to Re^5: Append the timestamp before and after the data in the logfile
in thread Append the timestamp before and after the data in the logfile

print "Started at ", (strftime "%a %b %e %H:%M:%S %Y", localtime($star +t)), "\n";

Also

scalar localtime

(See what localtime does in scalar context) - Oh, this bad habit of Perl having the right dwimmery built in!! ;-)