“Hello World” CGI Script
In the directory /home/httpd/cgi-bin/users/dbc on sirah, I create the file hello.pl, with contents:
#!/usr/bin/perl
print “Content-type: text/html\n\n” ;
print “<html><body><h1>Hello World!</h1></body></html>” ;
I mark this file world readable, and mark it executable:
sirah$ chmod o+r hello.pl
sirah$ chmod +x hello.pl
Now I point my browser at the URL:
http://sirah/cgi-bin/users/dbc/hello.pl