programming-examples/perl/Datatype/Set the value of localtime to a scalar variable, you'll get a typical UNIX-style time.pl
2019-11-15 12:59:38 +01:00

8 lines
89 B
Perl

#!/usr/bin/perl -w
$t = time();
$now = localtime($t);
print "Time is: $now\n";