in reply to Undeclared CGI???

Try replacing your use CGI; with use CGI qw/:standard /; and see if the error still occurs.

Cheers!

Replies are listed 'Best First'.
Re: Re: Undeclared CGI???
by Nickd_69 (Novice) on Aug 13, 2003 at 04:57 UTC
    Tried what you said but giving this error now: Undefined subroutine CGI::Vars. Any more Ideas? Thanks for your help guys.

      The Vars() method was added in version 2.50 of CGI.pm - which is older than the version in perl 5.00503 core (2.56) so you have either got an older version of perl than the one you think you have or you are picking up the CGI module from elsewhere.

      /J\
      
      Sounds like an incomplete or incorrect installation of the CGI module perhaps?

      Cheers!

      To get the CGI Vars method, you must import the :cgi-lib functions. Add it to your 'use CGI' line. Read all about it here: perldoc CGI

      use CGI qw(:standard :cgi-lib);

      YuckUse

        Tried what you said but still getting the same error Undefined subroutine CGI::Vars. I am not trying to debug the script usng perl on my computer but running the script on my web server which then brings the errors up. Undeclared to me sounds like the code is wrong. Any other ideas. Shouldn't that CGI module which is a pretty common one be working on my web server? Any other ideas anyone? Going through my code line by line is pointless cause as soon as I get down a few lines the same thing happens.