I found something like this to work:
# Set the environmental variables
$ENV{'REQUEST_METHOD'} = 'GET';
if (not($page)) {
$ENV{'QUERY_STRING'} =
"config=$config&restrict=$restrict&exclude=$exclude&words=$squery&method=$method&format=$format";
} elsif ($restrict) {
$ENV{'QUERY_STRING'} =
"config=$config&words=$squery&restrict=$restrict&method=$method&format=$format&page=$page";
} else {
$ENV{'QUERY_STRING'} =
"config=$config&words=$squery&method=$method&format=$format&page=$page";
}
system("$dir/htsearch");
At 03:10 PM 6/18/99 -0400, Krishna wrote:
>
>Hello,
>
>I am trying to write a perl scrit that will execute htsearch.
>The problem i am having is , htsearch doesn't "see" the variable that
>is set by the script.
>
>When trying to execute the other program the environment is set
>correctly.
>
>What am i doing wrong ?
>
>The example below will always return:
>"no matches were found to "".
>
>i.e none of the env. parametrs are set correctly!
>
>#!/usr/bin/perl
>$ENV{restrict}="";
>$ENV{exclude}="";
>$ENV{words}="test";
>$ENV{method}="or";
>$ENV{config}="htdig";
>$ENV{format}="long";
>$ENV{lmatchesperpage}="15";
>system "htsearch";
>
>
>Thanks
>krishna
>
>------------------------------------
>To unsubscribe from the htdig mailing list, send a message to
>[EMAIL PROTECTED] containing the single word "unsubscribe" in
>the SUBJECT of the message.
>
>
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.