in reply to html->perl->c->perl...... work dang it
Your global variables ($username, etc.) are being clobbered by the Command() subroutine after being set by the CGI input params. When called as a CGI, @ARGV will be blank. I suggest moving the CGI param fetching into a get_cgi_params() subrotine (or whatever you want to call it). Then check if @ARGV is defined. If it is, call Command(). If not, call get_cgi_params().
Also, you'll want to check into getting a templating system. HTML::Template is a very popular choice, but hardly the only one.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: html->perl->c->perl...... work dang it
by jcpunk (Friar) on May 15, 2003 at 16:50 UTC | |
|
Re: Re: html->perl->c->perl...... work dang it
by jcpunk (Friar) on May 15, 2003 at 16:55 UTC | |
by halley (Prior) on May 15, 2003 at 17:07 UTC | |
by Anonymous Monk on May 15, 2003 at 17:59 UTC |