I am not able to get desired output in HTML using a small perl script. When I execute the below script it outputs the text fine (using 'perl test.pl' command). However, on my browser, when I key in the address of the script "http://localhost/test.pl", I get output as the script itself. I have given the execute permission for the script but it still doesn't work, also the path of 'perl' is correct. I just want the output as "Perl works!". Here is the script I have been working on,

Normally scripts go in the cgi-bin, not in the root www directory although the server could be setup like that if you wanted to. Google for a tutorial for your specific http server and read about setting it up to run scripts. There are a lot of forums that discuss server topics too so you may want to find a forum that has a topic area for apache. -------------------------------------------------