programming-examples/perl/Subroutine/Call a subroutine through its reference.pl

6 lines
95 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
sub subroutine
{
print "Hello!\n";
}
$codereference = \&subroutine;
&$codereference;