in reply to $ENV{'REQUEST_METHOD'} undefined?

Though I can't relate the error message to line number 10 (you should have included line numbers in your listing), I agree with you that the environment variable REQUEST_METHOD is not defined. This is, however, not a problem related to Perl, so maybe you should post your question at a forum related to the webserver you are using.

Since you complain that the same error is true when you invoke the script from the command line, I have to ask you: Are you sure that you had defined those environment variables on the command line, before invoking your program?

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^2: $ENV{'REQUEST_METHOD'} undefined?
by Lamont85 (Novice) on Nov 30, 2009 at 12:52 UTC

    I belive this is a problem with my Perl syntax since I have used this subroutine in the past without error on the same server running the same version of Perl. I have recently moved the subroutine readPostInput() from the bottom of the script to the top because I was receiving an error similar to this:

    main::readPostInput() called too early to check prototype at index.pl line 18.

    This problem didn't persist until after I used this forward declaration technique.

      I belive this is a problem with my Perl syntax
      Did you verify the environment at the point of failure? Honestly, we are talking whether or not a certain environment variable is or is not defined at a particular point of the program. This can be verified easily. Also, you can verify whether this environment variable is or is not defined at the start of the program (to cover the case where your program is deleting it from the environment). What did you find out in this respect?

      -- 
      Ronald Fischer <ynnor@mm.st>