in reply to how can I store a reference to a method/function along with the parameters?

Or you could use a closure:
sub myMethod { my ($param) = @_; return sub { if ($param) { print "Woohoo, you have successfully passed in a parameter + ($param).\n"; } else { print "You have not attempted to pass in a parameter.\n"; } } } my $methodWithoutParam = myMethod(); $methodWithoutParam->(); my $methodWithParam = myMethod('My Param'); $methodWithParam->();
  • Comment on Re: how can I store a reference to a method/function along with the parameters?
  • Download Code