Re: [htdig] Running htsearch from perl script

Torsten Neuer (
Fri, 18 Jun 1999 20:14:29 +0200

According to Krishna:
>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
>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!
>system "htsearch";

You must set 2 evironment variables that are normally used only
by CGI: REQUEST_METHOD and QUERY_STRING. These variables must
be encoded according to URI standards.

If REQUEST_METHOD and QUERY_STRING are not set, htsearch will
default to interactive mode. I hacked up a patch to support
issueing query strings on the command line and Gilles wrote
a cleaner version that should now be in the CVS. You might
like to try a snapshot or wait for the next release of ht://Dig ,-)


InWise - Wirtschaftlich-Wissenschaftlicher Internet Service GmbH
Waldhofstraße 14                            Tel: +49-4101-403605
D-25474 Ellerbek                            Fax: +49-4101-403606
E-Mail:            Internet:

------------------------------------ To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in the SUBJECT of the message.

This archive was generated by hypermail 2.0b3 on Fri Jun 18 1999 - 10:40:31 PDT