Solved

"require" on Win95 with WebSite2.3a

Posted on 1998-08-26
4
185 Views
Last Modified: 2010-03-04
Hello, I am having a problem with using the require command in Perl,
                      and cannot solve it. I would very much appreciate if someone could
                      help me.

                      I have 3 files called config.pl, webbbs.pl and webbbs_text.pl in the
                      folder C:\WWW\LR2\ The first lines in config.pl are as follows:

                      require "./webbbs.pl"; require "./webbbs_text.pl";

                      This doesn't work!! That is, when i run config.pl from the browser
                      through localhost on WebSite2.3a, I get a 500 Server Error (CGI
                      output from C:/WWW/LR2/config.pl contained no blank line separating
                      header and data), and yet, all the scripts compile with no errors
                      using the Perl Interpreter in DOS.

                      That is why i suspect that something is wrong with requre.

                      Also, i have tried require "C:\\WWW\\LR2\\webbbs.pl"; to no avail.

                      Please help.

                      Thank you,

                      Ilia.
0
Comment
Question by:ilia
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
b2pi earned 100 total points
ID: 1204553
Before you do the require, change the directory to where you think it
should be:

chdir 'c:\WWW\LR2' || die "Content-type: text/html\n\n<br> $!\n<br>";


0
 
LVL 1

Author Comment

by:ilia
ID: 1204554
I did as you've suggested, and it didn't fix anything. I still get the 500 Server Error...
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1204555
I wish you hadn't accepted the answer.  Perhaps I didn't read the
question fully enough.  Could you please show the EXACT output of the
script when you run it from a command line (DOS)?
0
 
LVL 1

Author Comment

by:ilia
ID: 1204556
Sorry but i think i fixed the problem already.
thanks again. your chdir suggestion was useful anyhow. i didn't know of this command
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question