programming-examples/perl/Subroutine/Return a reference from a sub.pl
2019-11-15 12:59:38 +01:00

9 lines
123 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
sub now { return \scalar(localtime) };
print "The time is ${&now}\n";