.pl or .cgi for perl web script file

Posted by Nano HE on Stack Overflow See other posts from Stack Overflow or by Nano HE
Published on 2010-05-13T05:15:48Z Indexed on 2010/05/13 5:24 UTC
Read the original article Hit count: 224

Filed under:
|

HI. I created two files 'hello.pl' and 'hello.cgi' with the code below.

#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "hello world";

I can view the page via both http://www.mydomain.com/cgi-bin/hello.pl and http://www.mydomain.com/cgi-bin/hello.cgi. Which one is more sense in Perl web dev?

BTW, the directory of 'cgi-bin' created by my VPS server, Do I need contact with my VPS support to remove it or just remain it like this URL style? Maybe http://www.mydomain.com/perDev/hello.cgi is better?

© Stack Overflow or respective owner

Related posts about perl

Related posts about web-development