in reply to shell script via perl (clarification)

From your description the process seems to be:

Perl script X runs shell script Y
Shell script Y sets environment variable
Shell script Y executes binary executable Z
binary executable Z terminates, control returns to shell script Y
shell script Y terminates (losing environment variable setting), control returns to perl script X

In which case the binary executable Z and shell script Y should be able to see the environment variable.

In other words, a perl script can run a shell script that relies on setting/getting environment variables. The perl script will not be able to read the environment variables, because once the shell script terminates, the variables will be lost.

--------------------------------------------------------------

"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."

John Brunner, "The Shockwave Rider".

  • Comment on Re: shell script via perl (clarification)