in reply to How to execute a Korn shell ". <some-file>" from within Perl
You seem to be misunderstanding two things.
You can use a method such as runrig suggested; run a child process and then copy the child's environment into perl's. Or you can just set perl's environment in the first place. If you can be sure your shell script won't contain anything but simple variable assignments, parsing it directly wouldn't be too difficult. (Be forewarned that you'll be forever limited in the complexity of the shell script though.)
Finally, you also should keep in mind that perl uses /bin/sh to execute commands in backticks or when you call system with a single argument that contains shell metacharacters. Unless /bin/sh is really a Korn shell in your environment you should be careful of compatibility issues.
-sauoq "My two cents aren't worth a dime.";
|
|---|