in reply to [SOLVEDish] Please help me with this Heredoc

Using POSIX 'strftime', you may print today's date. POSIX is core Perl since version 5.

use POSIX qw/ strftime /; my $date = strftime "%Y-%m-%d %H:%M:%S", localtime;