Mail Archives: djgpp/1999/07/31/14:35:23
At 16:25 24/07/99 GMT, you wrote:
>Hi,
>
>I'm writing CGI script in perl, and for debugging from command
>line, under win95, I need to set some environment variable with
>an equal sign inside its value. DOS seem to be unable to do such simple
>thing. So I try to do it in C.
>
>I use the standard function setenv() getenv(), but I can export what
>is done during the program to the upper shell. Is there a way for doing
>such thing ?
>
>Currently, I've written a wrapper which set var and run the script
>passed as argument or from a file...
>
>What I want is to recreate a setenv command. So I just have to do :
>
>setenv QUERY_STRING "pattern=HTML"
>
>and the environment variable is updated (or created) to this new value.
>
>Any idea ?
The only one I can see is to do it in a wrapper program and then call via
the spawn function family your perl intrepeter. The environment should
inherit the environment variable you set.
You should for sanity sake try first set the variable and spawn() or exec()
printenv to be sure this works.
HTH
Cesar
>May be creating the var with batch file, and keeping modifications done
>by the program...
>
>Sylvain.
>--
>Sylvain VIART - Computer scientist - Programmer analyst
> -+= -------------------- * --------------------- =+-
> Editor : VIM - 5.3 Win32
> VIM - 5.4o Linux
> OS : Win95
> Linux kernel 2.0.29 (Debian 1.3.1)
> -+= -------------------- * --------------------- =+-
>Je suis présentement à Montréal
>MAILTO:viarts AT jsp DOT umontreal DOT ca
>
>
- Raw text -