call perl file

Hello,

Normal perl (test.pl) file I can call from php and run well but when I use Yii and call test.pl file then I get this error from GUI. Can anyone tell me where is the problem?

Error

#!/usr/bin/perl -w # hello.pl - My first CGI program print "Content-Type: text/html\n\n"; # Note there is a newline between # this header and Data # Simple HTML code follows print " \n"; print ""; print "\n"; print "\n"; print "

Hello, world!

\n"; print " \n";

My code is

<?php include("/var/www/test/cgi-bin/test.pl"); ?>

use the exec command instead of include

Hello,

I used exec following way but did not see any output.

<?php exec("/var/www/test/cgi-bin/test.pl"); ?>

Can you tell me how to do this?

Thanks

Neel

Hello,

Find the solution

<?php shell_exec("/var/www/test/cgi-bin/test.pl"); ?>