in reply to interaction perl - Korn shell variables
Assuming Perl doesn't given an error for trying to execute a directory ("."), it'll launch /bin/sh to execute it. That means using "." is wrong here. You're executing a ksh script in sh.
Each process has it's own environment. While changes are inherited by children, changes don't affect the parent. So while you are changing ksh's environment, your Perl script's environment will remain unchanged.
This has been discussed a number of times before. The solution usually involves printing out the environment and have it parsed by your Perl script.
my @env = `ksh -c '. /path/urmset_01 rp 010101 && set'`; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: interaction perl - Korn shell variables
by jevaly (Sexton) on Apr 20, 2009 at 13:16 UTC |