programming-examples/perl/Subroutine/Pass reference to a subroutine to another subroutine.pl
2019-11-15 12:59:38 +01:00

11 lines
104 B
Perl

sub printhello
{
print "Hello!\n";
}
sub printem
{
&{@_[0]};
}
printem \&printhello;