perl.beginners.cgi Weekly list FAQ posting

2005-03-21 Thread casey
NAME beginners-faq - FAQ for the beginners-cgi mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email addres

Calling subroutines

2005-03-21 Thread Denzil Kruse
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() }

Re: Calling subroutines

2005-03-21 Thread Wiggins d'Anconia
Denzil Kruse wrote: 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 =

Re: Calling subroutines

2005-03-21 Thread Denzil Kruse
--- Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > > > Denzil Kruse wrote: > > 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 pag

Re: Calling subroutines

2005-03-21 Thread Ovid
--- Denzil Kruse <[EMAIL PROTECTED]> wrote: > 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() } As mentioned previously, CGI::Application is a good choice for thi

Re: Calling subroutines

2005-03-21 Thread Randal L. Schwartz
> "Denzil" == Denzil Kruse <[EMAIL PROTECTED]> writes: Denzil> But, I fooled around with my above code found out that Denzil> if I put some curly brackets in the right place, I Denzil> think it works: Denzil> $page = $in->param('page'); Denzil> &{page$page}() You really really *really* don'