G+_Matthew Reardon Posted November 14, 2014 Share Posted November 14, 2014 I was inspired upon seeing Patrick Delahanty to go back over the perl modules. I was having issues with getting xampp (the recommended server program from +Nathan Follmer) to work on my Windows machine. If you installed perl per the earlier episode instructions you will have the perl installed to the c drive. Perl will also be installed as part of the xampp installation. Patrick's episode 25 demo code has the first line as (see complete code in github) #!/usr/bin/perl The code as written didn't work straight up. I finally figured out you can look at the apache error log (on xampp control panel-log button) and then google your problems. This led me to believe the first line was the problem. There was a perl script called printenv.pl in the cgi-bin directory that did work in the browser. I took it's first line and inserted it into the ep25 code : #!"C:\xampp\perl\bin\perl.exe" From the browser, this caused a window to pop up asking me how I wanted to open the perl file (had drop down for command line). I went back to the printenv.pl script that worked and i changed the Patrick's demo code line: print "Content-type: text/ascii;\n\n"; and changed it to: print "Content-type: text/plain; charset=iso-8859-1\n\n"; This finally worked and hello world popped up in the browser. I'm not really sure why this worked maybe it has something to do with the two installations of perl that I mentioned above or maybe it was the print line. Pretty painful but I think I'm on the right track. https://github.com/PadreSJ/c101_Module3_Perl/blob/master/episode5a.pl Link to comment Share on other sites More sharing options...
Recommended Posts