in reply to Re: Is it possible to use a scalar to call a subroutine?
in thread Is it possible to use a scalar to call a subroutine?
I would use:
my $sub = \&do_this; print $sub->("Fred");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Is it possible to use a scalar to call a subroutine?
by kennethk (Abbot) on May 06, 2010 at 17:39 UTC |