RosettaCodeData/Task/Higher-order-functions/Perl/higher-order-functions-3.pl

8 lines
93 B
Perl
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
sub first {shift->()}
sub second {'second'}
print first \&second;
print first sub{'sub'};