programming-examples/perl/Datatype/Create new time based on the value from localtime.pl
2019-11-15 12:59:38 +01:00

9 lines
207 B
Perl

#!/usr/bin/perl
use warnings;
my ($sec, $min, $hour, $day, $month, $year) = localtime();
print "The time is: $hour:$min.$sec \n";
$month++;
$year += 1900;
print "The date is: $year/$month/$day \n";