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
In reply to Re: html->perl->c->perl...... work dang it
by hardburn
in thread html->perl->c->perl...... work dang it
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |