I have ActivePerl and Apache installed (and working as best as I can tell). The below code runs fine when I call Hello.pl in cmd, but when I try to open Hello.pl in any web browser, it just displays the script/code (or, in chrome, automatically downloads Hello.pl). ______________________________ #!perl print "Content-type: text/html \n\n"; #HTTP HEADER print "Hello"; ______________________________ Also, I'm on a windows (xp) machine, running Apache 2.0 (using XAMPP win32-1.7.0). I put these lines in the apache httpd.conf: ______________________________ Options +ExecCGI AddHandler cgi-handler .cgi .pl ______________________________ Any help would be greatly appreciated ...happy holidays!
Looks like you have a lot of typos there. Try "AddHandler cgi-script .cgi .pl" ( You have cgi-handler ). Also, windows is funny about the interpreter line or "shebang" line in a perl script ( like your example #!perl ). Not sure '#!perl' is going to work.
Thanks for your help. You said "a lot of typos" - did you see anything else? I tried changing cgi-handler to cgi-script in the httpd.conf file...still no luck running the hello.pl in a browser. Again, though, the file runs just fine using a command line, so I figured my hashbang was correct. I have active perl installed using the default installation options (e.g. it is installed in C:\Perl ).