in reply to a loop for creating subroutines?
$mysubs{name} = sub { #subroutine implementation }; ... $mysubs{name}->("call","args","whatever");
(untested)
another approach with a dedicated package
*MySubs::name = sub { #subroutine implementation }; ... # and later MySubs::name("call","args","whatever"); # ... or ... package MySubs; name("call","args","whatever");
(also untested)
TIMTOWTDI...
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: a loop for creating subroutines?
by mascip (Pilgrim) on Aug 27, 2012 at 16:43 UTC | |
by LanX (Saint) on Aug 27, 2012 at 16:49 UTC |