To display time and date in perl use:
Note: you might need to install date time module. sudo apt-get install libdatetime-perl
use POSIX qw(strftime);
print strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time())) . "\n";
Note: you might need to install date time module. sudo apt-get install libdatetime-perl