Mailing List Archive

invoking waislook from an CGI NT perl script
I have Netscape NT server up and the new 100 build of NT perl installed and
several form handling scripts working just fine. However, I have been
trying to get a CGI perl script to work that needs to invoke waislook (from
EMAC 0.7 toolkit) and catch its output and am failing.

My CGI perl script fragment for invoking waislook looks something like this

$dir="C:/ns/ns-home/docs/man/cgn"; #directory for the waislook
target
&chdir($dir);
$cmd ="waislook -d cgn -http garbage"; #hard wired waislook invocation

print "Content-type: text/html\n\n";
print "<HTML>\n";

open(WAIS, "$cmd|");
While (<WAIS>) {
print $_;
}

print "</HTML>\n";


This works perfectly from the cgi-bin directory when invoked from a shell
but it does not work when invoked from the Netscape server. The script is
otherwise hooked up properly to the Webserver (I can put other prints in
this script and they are getting returned to the browser but nothing from
the output of the waislook pipe WAIS). Both the path to the wais and perl
executables are in the system path.


Is anyone else driving waislook from an NT perl CGI script and catching the
results back for browser display? Any suggestions as to how to do it
correctly would be greatly appreciated.

Keith Willard
kwillard@msmail.hsii.ccare.com