Hello,
I have a simple question about how to run Perl program. When I clicked this link:
http://cmo.x10hosting.com/cgi-bin/test.pl
I supposed to see a blank page with "hello world" but instead the server ask me to download this file or open it. Did I miss anything?
Related files are as the following. Any comment will be appreciated.
[.htaccess]
<FilesMatch "test.pl">
SetHandler perl-script
Options +ExecCGI
</FilesMatch>
[test.pl]
#!/usr/bin/perl
BEGIN { push @INC, "/home/cmo/www/cgi-bin"; }
use strict;
print "Content-type: text/html\n\n";
print "hello world";
I have a simple question about how to run Perl program. When I clicked this link:
http://cmo.x10hosting.com/cgi-bin/test.pl
I supposed to see a blank page with "hello world" but instead the server ask me to download this file or open it. Did I miss anything?
Related files are as the following. Any comment will be appreciated.
[.htaccess]
<FilesMatch "test.pl">
SetHandler perl-script
Options +ExecCGI
</FilesMatch>
[test.pl]
#!/usr/bin/perl
BEGIN { push @INC, "/home/cmo/www/cgi-bin"; }
use strict;
print "Content-type: text/html\n\n";
print "hello world";