I've been trying to do some research on PERL and I have found some basic "programs" to try, such as:
Now, some pages tell me to save it as a .pl file, some say .cgi file.
Either way, when I try to run it in Firefox or Safari, it simply displays the code as text instead of running it.
Some webpages have told me to run it in the terminal, but that does nothing either.
I am running 10.3.9 and I have never done anything to configure the Apache server (which is probably the problem).
I just feel like I'm never going to figure out PERL (and then PHP) if I can't even figure out how to make a simple print-to-screen sample work. The programming itself will be relatively easy for me, but I need to get the environment working first.
Any and all help is greatly appreciated.
Code:
#!/usr/bin/perl -wT
use strict;
print "hello world.\n";
print "<h2>HOLA</h2>\n";
Now, some pages tell me to save it as a .pl file, some say .cgi file.
Either way, when I try to run it in Firefox or Safari, it simply displays the code as text instead of running it.
Some webpages have told me to run it in the terminal, but that does nothing either.
I am running 10.3.9 and I have never done anything to configure the Apache server (which is probably the problem).
I just feel like I'm never going to figure out PERL (and then PHP) if I can't even figure out how to make a simple print-to-screen sample work. The programming itself will be relatively easy for me, but I need to get the environment working first.
Any and all help is greatly appreciated.