I think what is happening here is that the include statement doesn't perform an HTTP GET. It merely opens the file and includes the output into the current php file (much like #include in c/c++). To achieve what you want, you will have to something like this.
$fp = fopen( "http://www.yoursite.com/cgi-bin/$document.cgi", "r" );
iff( $fp )
{
while( ! feof( $fp ) )
{
$Line = fgets( $fp, 1024 );
print $Line;
}
fclose( $fp );
}
Alternately you could, use the system function to run the perl script through perl.
Hope I've helped.