http://qs321.pair.com?node_id=559268


in reply to Re: CGI Post query
in thread CGI Post query

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.

Replies are listed 'Best First'.
Re^3: CGI Post query
by davorg (Chancellor) on Jul 05, 2006 at 08:50 UTC

    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