Ask Experts Questions for FREE Help !
Ask
    sfbattles's Avatar
    sfbattles Posts: 3, Reputation: 1
    New Member
     
    #1

    Apr 13, 2007, 06:52 AM
    environment varibles after perl program ends
    Is it possible to save the environment variable that Perl modified after the Perl program ends.
    example
    I want to use the PATH that my Perl script set as my unix PATH.



    Can this be done?
    asterisk_man's Avatar
    asterisk_man Posts: 476, Reputation: 32
    Full Member
     
    #2

    Apr 16, 2007, 07:37 PM
    I don't claim to be a perl expert but I can't think of a way to do this. When perl closes it's environment and memory is discarded. If you had perl output the values you wish to use you could capture them and set them external to the perl script but this may be messy. For things like ksh or bash you would do this like:

    . ScriptWhichSetsPath

    But I am pretty sure this won't work for a perl script. ScriptWhichSetsPath is read line by line and executed in the current shell.

    If you want to try to output the result and handle it in the script that called the perl code let me know and I can try to help you with that.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Need help with Perl! [ 3 Answers ]

I am currently learning how to use Perl from a book. One of the exercises on chapter 4 (Scalars, Arrays and Hashes) has really left me dumb. This is the problem, but I can't figure out the coding to make the "Course code" typed in the user to appear in the place of "Shell Programming" where it...

Perl necklace [ 3 Answers ]

I was given a perl necklace but it is broken And I want to fix it but I can't get the thread out it looks like that there is a knot or something on the thread in the perl How do I get the perls off thr thread? Please help

Orca/ environment [ 1 Answers ]

I was wondering if someone could help, I need to know the environmental conditions under which an orca (killer whale) is found , and the resources it requires for survival?

Map home drive on a Mac environment from WIndows 2000 Server [ 0 Answers ]

Hopefully some one can help me I am using WIndows 2000 Server and have created user accounts on active directory. The lab which the user are going to access this server are using emacs running OS 10.2 & 10.3. I am trying to give user a home directory in which they can save work. -I need a...


View more questions Search