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

8 lines
93 B
Perl
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
sub first {shift->()}
sub second {'second'}
print first \&second;
print first sub{'sub'};