programming-examples/perl/Datatype/Set the value of localtime to a scalar variable, you'll get a typical UNIX-style time.pl

8 lines
89 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
$t = time();
$now = localtime($t);
print "Time is: $now\n";