programming-examples/perl/Subroutine/Return a reference from a sub.pl

9 lines
123 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use warnings;
use strict;
sub now { return \scalar(localtime) };
print "The time is ${&now}\n";