Solved

"require" on Win95 with WebSite2.3a

Posted on 1998-08-26
4
197 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
[X]
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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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

705 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