in reply to environment variable

I don't think you are having a problem with environment inheritance, you must be having a problem with something else. Consider

#include <stdlib.h> #include <stdio.h> int main( int argc, char **argv ) { char *arg = *++argv; printf( "%s is %s\n", arg, getenv(arg) ); exit(0); }

which is named env-echo.c, which you should compile with cc -o env-echo env-echo.c. You can then use this script:

#! /usr/bin/perl -w use strict; my $var = shift || 'FOO'; my $value = shift || 'bar'; $ENV{$var} = $value; system "./env-echo $var";
And if I run that as ./env-change HOME /tmp the child process prints out HOME is /tmp. What does this code do when you run it on your system?

--
g r i n d e r
just another bofh

print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u';