Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7015453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:39:14+00:00 2026-05-27T22:39:14+00:00

I have a perl.cgi file which has the content: #!/usr/bin/perl print Content-type: text/html\n\n; print

  • 0

I have a perl.cgi file which has the content:

#!/usr/bin/perl 
print "Content-type: text/html\n\n";
print "<h1>Hello World</h1>\n";

I made it executable. (chmod a+x perl.cgi)

Then I created a new file perl.htm in the same directory. Which has the following data:

Content-type: text/html
<p><a href="perl.cgi">RUN perl.cgi</a></p>

When I run the perl.htm in my browser then I get the output as:

Content-type: text/html
RUN perl.cgi

When I click on RUN perl.cgi another page opens and there the output is:

#!/usr/bin/perl 
print "Content-type: text/html\n\n";
print "<h1>Hello World</h1>\n";

i.e. the perl.cgi is not executing. Only the file contents are being shown.

EDIT: From the answers and comments I came to know that I will have to configure my web server (apache) to run cgi scripts. How can I do that? Let me know.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:39:15+00:00Added an answer on May 27, 2026 at 10:39 pm

    Problem has been solved. I was not using httpd service at all, was opening from file:// URL.

    Perl script is not executing in HTML form

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have something like: #!/usr/bin/perl use strict; use warnings; use CGI::Simple; use DBI; my
I have this Perl script sitting in the cgi-bin folder of my Apache server:
I have simple Perl/CGI scripts based web server which is mainly used to display
I have written a Perl script to read the configuration file and create CGI
What should you call after printing HTML from a Perl CGI script? I have
I have a CGI script pulling bibliography data from a BibTeX file, building HTML
I have an .htaccess file which calls a perl script if certain conditions are
I have this Perl/CGI to upload files and get the uploaded file size while
I am using CGI.pm version 3.10 for file upload using Perl. I have a
I have a perl cgi script that's fairly resource intensive (takes about 2 seconds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.