in reply to subroutines - creating a custom subroutine and 'subroutine redefined' errors

The code in Re: Howto avoid large hard-coded else-if function calls seems to be an almost exact match for your requirement.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re: subroutines - creating a custom subroutine and 'subroutine redefined' errors

Replies are listed 'Best First'.
Re^2: subroutines - creating a custom subroutine and 'subroutine redefined' errors
by Anonymous Monk on Aug 14, 2007 at 12:46 UTC
    Thanks to everyone for the replies - a dispatch table was exactly what I needed and has cleaned up my code very nicely! Cheers.