in reply to Re: Re: Problem with my .pl script. Helpppp!
in thread Problem with my .pl script. Helpppp!

I may not use the words "your problem is" but I'm pretty sure I do point out an important one(study the code snippet, notice anything? when do the headers get printed? You do the same in your code, and webservers don't like it). CGI Help Guide covers everything there is to know about debugging programs in the CGI environment.

At this point i'd like to refer you to About the PerlMonks FAQ -> How do I post a question effectively?. CGI Help Guide tell you how to get the detailed information How do I post a question effectively? tells you you're missing (ie, the detailed error messages).

You should really go and read/tryout CGI Help Guide a couple of times now (once you read it it'll be easy for you to debug your program, and easier for others to help you).

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Re: Re: Problem with my .pl script. Helpppp!

Replies are listed 'Best First'.
Re: Re: Re: Re: Problem with my .pl script. Helpppp!
by webstudioro (Acolyte) on Aug 31, 2003 at 17:00 UTC
    ok. All my script work ok, but if i write
    #!perl -wT use CGI::Carp('fatalsToBrowser'); use warnings; use CGI qw(:standard); use CGI::Cookie; use CGI; require "sub.pl"; require "variabile.pl"; ################################ my code....... ################################


    require "sub.pl"; and require "variabile.pl";
    don't work. The error it's : Can't locate sub.pl in @INC (@INC contains: C:/indigoperl/lib C:/indigoperl/site/lib) at c:\INDIGO~1\CGI-BIN\LC\ADMIN.PL line 9.
    . All my ( require "file.pl"; ) don't want to work. Whay?
      Because the locations of sub.pl and variable.pl are not being found by Perl. When you require a file, Perl looks inside the @INC array and tries to find files in the only 2 paths it has: C:/indigoperl/lib and C:/indigoperl/site/lib. If i were you, i would find the full path to the directory that contains those two files and add the following line BEFORE you require those two files:
      use lib '/path/to/my/files';
      Or, if that doesn't work:
      push @INC, '/path/to/my/files';
      You will have to replace that string with the proper path, of course. Please don't ask us what that proper path is, you will have to figure this one out. (hint: it's the full path of the folder that contains those two files that you want in include.)

      And please, dude. The word is why, not whay. I told you this once before. I get the feeling that you aren't listening ...

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      
        Thank you Jeffa for all, but i'm not stupid. I know what it's
        my path for sub.pl and variable.pl . Sorry for my english.