Hi all,
I was trying to write a simple CGI script last night and ran in to some
issues.
use CGI;
my $query = new CGI;
my $vars = $query->Vars;
my $elements;
my $combined;
$elements{abc} = "123";
$elements{xyz} = "qed";
%combined = (%elements, %vars);
print %combined;
When I was first playing with this, I was using Perl 5.005 that was stock
installed in /usr/bin/perl on my Solaris 8 machine. When it started, it
would tell that I was in "standalone mode" or somesuch and to enter in
"name=value" pairs. Later, I discovered that it the CGI.pm version it had
installed didn't support the $query->Vars routine.
So, I upgraded to 5.8 using
www.blastwave.com. At first, it didn't work but
then I moved /opt/csw/bin on to the from of my PATH and then it found the
new perl.
Now, CGI no longer prompts me for the name=value pairs. I read some
documentation that said that it should, or that I could add pairs by doing
"x.pl abc=123" on the command line. But that isn't working either.
Now, this quick and dirty script has collapsed into mad, time wasting
struggle. As may be apparent, I'm not really up to speed on Perl (having
last dabbled with Perl 4), but "how hard could this be".
My hope was to basiclly develop, debug, and test the script as much as I
could from the command line before I dumped it onto the web server, but that
seems to be a hope that has been frustrated.
I was thinking this was a installation problem with my machine, but when I
tried in on Cygwin (which is running 5.8.0), I got similar behaviors.
Can someone perhaps nudge me in the right direction on what I'm doing wrong?
Apparently the documenation I've been using is wrong or out of date.
Thanx!
Regards,
Will Hartung
(
[email protected])