Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl Embedded: Setting %ENV, STDIN and Workingdirectory

by tlm (Prior)
on Jul 30, 2005 at 23:09 UTC ( [id://479657]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://479657]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-18 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found