Solved

"require" on Win95 with WebSite2.3a

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl - Mawk 2 105
perl split by | 2 111
Regular Expression for URL 10 109
what are these modules in perl script 4 106
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.…
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…

733 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