Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


"require" on Win95 with WebSite2.3a

Posted on 1998-08-26
Medium Priority
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,

Question by:ilia
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Accepted Solution

b2pi earned 300 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>";


Author Comment

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

Expert Comment

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)?

Author Comment

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

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

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…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Six Sigma Control Plans

610 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