> On Apr 29, 2004, at 9:36 AM, Cristi Ocolisan wrote:
>
> > I already used hidden fields, but because I couldn't figure out how to
> > write
> > a single script, I wrote dozens of different small scripts and sent
> > that
> > hidden field from one script to another.
> >
> > I'm tired of that. I want to write a single script that handles several
> > pages...
>
> my $mode = $query->param('mode');
>
> if ($mode eq 'add') { add_product(); }
> elsif ($mode eq 'edit') { edit_product(); }
>
You may want to check out the CGI::Application module from CPAN.
Personally I haven't used it, but it seems useful for building such scripts,
http://search.cpan.org/~markstos/CGI-Application-3.22/lib/CGI/Application.pm
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>