I would use:
my $sub = \&do_this; print $sub->("Fred");
In reply to Re^2: Is it possible to use a scalar to call a subroutine?
by JavaFan
in thread Is it possible to use a scalar to call a subroutine?
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |