in reply to Perl Embedded: Setting %ENV, STDIN and Workingdirectory

I'm sure there are more enlightened ways to do this, but my ignorant (and 100% untested) approach would be to use eval_pv to evaluate a string of Perl code within my C program.

As far as changing the working directory, at least in Unix, I'd just use chdir(2); no need to get perl involved for this.

the lowliest monk

  • Comment on Re: Perl Embedded: Setting %ENV, STDIN and Workingdirectory

Replies are listed 'Best First'.
Re^2: Perl Embedded: Setting %ENV, STDIN and Workingdirectory
by esskar (Deacon) on Jul 31, 2005 at 02:23 UTC
    well, since i have multiple threads, i think using the windows equivalent to chdir would affect all threads. But thats not a good idea, because one script has to run in a different directory than a other.
    But thanks for the eval_pv hint; i will be testing it!