Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

As a beginner, I want to learn a very simple .pl using CGI to display a Html page on my browser (IE). I copied this sample file from a Perl installation site. Unfortunately, either .pl or .cgi extension results in a error message as follows:
HTTP Error 404.3 The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler.
Please teach me how to run my 1st Perl script on the browser. Thank you for your help. timnish

Replies are listed 'Best First'.
Re: Help me run the 1st .pl
by roboticus (Chancellor) on Jul 21, 2014 at 14:04 UTC

    That sounds more like a configuration issue with your web server than a perl problem. You didn't even specify which web server you're using. Try asking your system and/or web site administrator how to get your code running from the web server. From the error message, it sounds like the web server is locating your code just fine (The page you are requesting cannot be served because of the extension configuration). It also tells the correct course of action: If the page is a script, add a handler. It sounds like you've tried the .pl and .cgi extensions, so it could be that the server would run them with a different extension--you need to have a chat with the administrator to find out if (a) they still need to configure the server to run scripts for your site, or (b) if you need to use a different extension on your scripts. (Other possibilities exist, too, such as the script may be in the wrong directory (i.e., one not configured to not hold scripts). But since it's not a perl problem, there's really no where to go but your admin.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

Re: Help me run the 1st .pl
by hippo (Archbishop) on Jul 21, 2014 at 14:03 UTC

    The error you have encountered is not specific to Perl. It is a consequence of the current configuration of the web server. You should talk to the person responsible for configuring the web server and ask them to allow your user to run CGI scripts. HTH.

Re: Help me run the 1st .pl
by marto (Cardinal) on Jul 21, 2014 at 14:04 UTC