or:sub testit{ print 'hi' };; sub doit (\&) { $_[0]->() };; my $codeRef = \&testit;; doit( &$codeRef );
I've a thing about prototypes, don't ya just love em!sub doit2 (&) { $_[0]->() }; doit2( sub { print 'hi2' });
In reply to Re: The & prototype and code references in scalars.
by cdarke
in thread The & prototype and code references in scalars.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |