- or download this
sub testit{ print 'hi' }
...
$codeRef = \&testit;
doit { &$codeRef };
- or download this
#!/usr/bin/perl
use Carp qw(cluck);
...
main::testit called at coderef.pl line 6
main::__ANON__() called at coderef.pl line 4
main::doit('CODE(0x955737c)') called at coderef.pl line 6
- or download this
#!/usr/bin/perl
use Carp qw(cluck);
...
at coderef.pl line 3
main::testit() called at coderef.pl line 4
main::doit('CODE(0x9f4c11c)') called at coderef.pl line 6