in reply to Re: Writing Plugin-Able perl scripts
in thread Writing Plugin-Able perl scripts
To call a subref, use $subref->(args).
Note, however, that the keys of a hash are always plain strings; they can't be references. If you try to use a ref, you'll end up getting the stringified version, which can never be reconstructed into a real reference. (Well, that isn't strictly true, but is close enough.)
So what you probably want to say is more like:
foreach (values %FunctionHash) { $return = $_->($data); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Writing Plugin-Able perl scripts
by fglock (Vicar) on Sep 03, 2002 at 02:17 UTC |