Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: CGI Post query

by wazoox (Prior)
on Jul 05, 2006 at 08:18 UTC ( [id://559266]=note: print w/replies, xml ) Need Help??


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 :)

Replies are listed 'Best First'.
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.

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://559266]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-04-23 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found