apache - perl/Cgi script with apache2 -
i have installed apache2 on unbuntu . working. want configure run perl/cgi scripts. made directory /var/cgi-bin scripts. made simple perl file echo.pl having following codes.
#!/usr/bin/perl use strict; use warnings; print qq(content-type: text/plain\n\n); print "hi\n";
made executable.
chmod +x /var/cgi-bin/echo.pl
executed it
/var/cgi-bin/echo.pl
but showed following error.
/var/cgi-bin/echo.pl: line 2: use: command not found /var/cgi-bin/echo.pl: line 3: use: command not found /var/cgi-bin/echo.pl: line 5: syntax error near unexpected token `(' /var/cgi-bin/echo.pl: line 5: ` print qq(content-type: text/plain\n\n);'
i cant find error. please help.
Comments
Post a Comment