I like something like this, where the sub name is is sub_KEYWORD (from a 
CGI, hopefully you can extract usefulness):

eval "sub_".param('page') if (param && defined param('page') && defined 
"sub_".param('page'));
&page_login; # If all else fails...

  - adm

At 02:02 PM 4/17/2002, Bill -Sx- Jones wrote:
>I have the habit of doing:
>
>          last if (substr($vFlag, 1, 3) eq 'END');
>$vSub = \&Sneex   if (substr($vFlag, 1, 5) eq 'SNEEX');
>$vSub = \&Admin   if (substr($vFlag, 1, 5) eq 'ADMIN');
>$vSub = \&Reports if (substr($vFlag, 1, 7) eq 'REPORTS');
>$vSub = \&Logs    if (substr($vFlag, 1, 4) eq 'LOGS');
>$vSub = \&Targets if (substr($vFlag, 1, 7) eq 'TARGETS');
>$vSub = \&Usenet  if (substr($vFlag, 1, 6) eq 'USENET');
>
>(substr($_, 0, 1) eq '[') ? next : &$vSub;
>
>
>(NOTE:  Obviously NOT all of the 668 lines of program code
>is here, so this doesn't stand on it's own two feet...)
>
>
>Q: Is there a better way?
>
>Thx;
>_Sx____________________
>   ('>    -Sx- IUDICIUM
>   //\   Have Computer -
>   v_/_    Will Hack...

__
Aaron D. Marasco
[EMAIL PROTECTED]
http://www.aaronmarasco.com

I love America every day, not just when she needs it.

"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." - Benjamin Franklin

Reply via email to