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 3460096
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:11:18+00:00 2026-05-18T10:11:18+00:00

I am very newbie to Perl. I wrote a very simple Perl program (script):

  • 0

I am very newbie to Perl.

I wrote a very simple Perl program (script):

print "hello";

When I execute it on command prompt (with command – perl first.pl), it works.

However, when I use the same Perl code in “filter” of apache it doesn’t work. To provide more details, I am invoking a filter for a URL in Apache Http Server with following configuration in httpd.conf file:

<Location /something.do>
      SetHandler modperl
      PerlResponseHandler MyApache2::FirstPerlProg
</Location>

FirstPerlProg.pm file (in indigoampp\perl-5.12.1\site\lib\MyApache2 location) has same code as first.pl.

The index.html page (first page) has a form which submits request to something.do and this filter gets invoked.

The issue is, how and where do I see this filter’s output (hello)?

Hope my question is clear.

I know that I am not making any HTTP response to be sent to browser in this filter code and that’s why I get ‘page can’t be displayed’ after submit. However what shall I do is something I don’t know.

Thanks.

  • 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-18T10:11:19+00:00Added an answer on May 18, 2026 at 10:11 am

    Depends on how you wrote it. Going by your code, the skeleton should look like

    package MyApache2::FirstPerlProg;
    
    use Apache2::Const qw(OK);
    use Apache2::RequestRec;
    use Apache2::RequestIO;
    
    sub handler {
      my ($r) = @_;
      $r->content_type("text/html");
      $r->print("hello");
      return OK;
    }
    
    1;
    

    This would be roughly the bare minimum for a mod_perl request handler. And this should be the response coming back from the request, should see it in the browser. You can also use Apache2::Log and then use $r->log_error("text") to send to the error_log.

    If you want your script to run CGI-ish, then use the ModPerl::Registry.

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

Sidebar

Related Questions

Very simple question, is there any cloud server enviroments avaliable these days for us
Well, I know this is another newbie question but I'm very frustrated and I'm
(very newbie questions) i may be misunderstanding this but on MSDN i believe it
(very newbie question, please help if you can) how do i connect visual web
This is a very newbie questions, but does the iPhone API provide any data
This is a very newbie question and i will probably get downvoted for it,
This is a very newbie question, and this is something I have done many
I'm very newbie to Ubuntu OS and I have my solution developed in visual
This might be a very newbie question, but I didn't find anything satisfying I
Very newbie question. I want to overwrite the Main in my WPF app so

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.