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'

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 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 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 =

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: Subroutines

2002-07-15 Thread Joel Hughes
Theresa, one way to go about this is to create your own module which has the connection details in it (or reads from ENV/external XML file etc) and also has your data access subroutines. Then instantiate instances of this modules whereever you need to. This is the best URL I can find which talks

RE: Subroutines

2002-07-15 Thread Camilo Gonzalez
Theresa, Paul Duboise in his book Perl and MySQL puts all connection schemes in a library. Would that work for you? -Original Message- From: Theresa Mullin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 2:31 PM To: [EMAIL PROTECTED] Subject: Subroutines Hi Everyone, I am

Subroutines

2002-07-15 Thread Theresa Mullin
Hi Everyone, I am writing a program in which I am connecting to an oracle database. I would like to put the environment variables and the connection routine into a separate subroutine, so I don’t have to keep re-copying the code. What’s the best way to go about this? Thanks, Theresa Theresa