0

I have a Perl script that works perfectly when I run it from my command prompt. But when I upload it to the cgi-bin folder on my website, it doesn't work. Is there a special format it needs to be or something? I'm totally new to Perl.

Also note: the test hello page Perl script works.

5
  • 1
    pls look at this -- lies.com/begperl/hello_cgi.html Commented May 30, 2013 at 1:11
  • 1
    Could be a bunch of things. Is it executable? Does CGI know how to run it? etc. Commented May 30, 2013 at 1:11
  • I mean how is it supposed to look, since its not being ran in terminal. Will there be a prompt to enter stuff? etc. Commented May 30, 2013 at 1:13
  • 2
    @RaymondPittman Why don't you show what you've done, instead of having us guess? Commented May 30, 2013 at 1:13
  • 1
    What does "doesn't work" mean? What does happen? What should happen? What's the difference? Whatever the problem, there is likely to be information in the server's error log. What does it say? Commented May 30, 2013 at 6:22

1 Answer 1

1

When you run your perl script under cgi (which you indicated is working), the query is passed to your script as STDIN, and the output of your script is sent to the browser.

There will not be a prompt, or anything like that, you need something else (such as a web page) to prompt the user for anything you need and submit it to your script.

The next page on from Bill's link (http://www.lies.com/begperl/form_to_email.html) deals with this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.