in reply to CGI Post query
print header;
looks weird, header looks like a bareword to me. Better do print header(); Then you'll probably find that you forgot to use CGI or something similar :)
Re^2: CGI Post query
by ant (Scribe) on Jul 05, 2006 at 08:41 UTC
|
Quick Update
I tried the print header() and that still did not work. I very definetly had use CGI at the top of the script.
I inherited the code in a new job, and the previous programmer who was a DBA and not a Perl programmer and for each HTML field had
my $something = param( 'something' );
over and over again, I was just changing the program so that all the values were loaded into a hash.
| [reply] [d/l] [select] |
|
Just having use CGI; isn't enough. If you're using the function interface to CGI.pm then you need to use one of the import tags - use CGI ':standard'; or use CGI ':cgi'; or something like that.
And if you're using CGI.pm, then you should really use the param method to access the parameters (as it seems the previous programmer did). Writing your own parameter parser as you seem to be trying to do is pointless and you're almost certain to miss out one of the corner cases that CGI.pm handles.
--
< http://dave.org.uk>
"The first rule of Perl club is you do not talk about
Perl club." -- Chip Salzenberg
| [reply] |
|