Solved

"require" on Win95 with WebSite2.3a

Posted on 1998-08-26
4
177 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

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…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

785 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