in reply to Getting name of sub from a hash-based dispatch table?
my %ops = ( '+' => sub { $_[0] + $_[1] }, '-' => sub { $_[0] - $_[1] }, '*' => sub { $_[0] * $_[1] }, );
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Getting name of sub from a hash-based dispatch table?
by theguvnor (Chaplain) on Jan 21, 2004 at 19:37 UTC |