Hi,

I have a script for a cgi form that covers about 20
pages, and want to name a subroutine to handle each
page like this: page1, page2, page3, etc.

Once the script figures out which page it should go
to, I dont want to have to do this:

if ($page == 1) { &page1() }
if ($page == 2) { &page2() }
if ($page == 3) { &page3() }
.
.
.

I would like to call the subroutine with one
statement, something like this:

$page = $in->param('page');

&page$page()

but the "compiler" doesn't seem to substitute the
variable $page before figuring out the name of the
subroutine and it gives me an error.  I thought about
loading the subroutine referencees into an array, but
run into the same problem.

Is there a way to do this?  Or is there a better way
for the beginning part of the script to play traffic
cop and direct it to the right page?




                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to