Re: help with dispatch array

2009-06-09 Thread Williamawalters
hi barry and mike -- In a message dated 6/9/2009 6:44:02 PM Eastern Standard Time, mi...@s2technologies.com writes: > So, something like: > > my %functionTable = ( > 'string_1' => sub { >}, > 'string_2' => sub { >}, > ); > > invocation via: > > &$functionTable{'string_1'}(ARGLI

Re: help with dispatch array

2009-06-09 Thread Michael Ellery
So, something like: my %functionTable = ( 'string_1' => sub { }, 'string_2' => sub { }, ); invocation via: &$functionTable{'string_1'}(ARGLIST); ..is that what you had in mind? -Mike Barry Brevik wrote: > I am running Active Perl 5.8.8 on Windows. > > I'm coding an app right now w

help with dispatch array

2009-06-09 Thread Barry Brevik
I am running Active Perl 5.8.8 on Windows. I'm coding an app right now where it would be advantageous to be able to look up a text string in an array (or hash) and be able to branch to a subroutine that is somehow associated with that string. Am I dreaming, or is this possible? Barry Brevik