Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Scripting > Perl   »   enviroment varibles after perl program ends

 
Thread Tools Display Modes
Question
 
 
#1  
Old Apr 13, 2007, 05:52 AM
sfbattles
New Member
sfbattles is offline
 
Join Date: Apr 2007
Posts: 4
sfbattles See this member's comment history on his/her Profile page.
enviroment 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?

Reply With Quote
 
     

Answers
 
 
Old Apr 16, 2007, 06:37 PM   #2  
Full Member
asterisk_man is offline
 
asterisk_man's Avatar
 
Join Date: Nov 2006
Location: East coast of U.S.A.
Posts: 472
asterisk_man See this member's comment history on his/her Profile page.
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.

Comments on this post
sfbattles agrees: Yes very helpful, but I was hoping it could be done.
  Reply With Quote
 
     


Thread Tools
Display Modes

 
Similar Sponsors

Similar Threads
Question Asker Forum Answers Last Post
servlets vs CGI-PERL hreddi Perl 0 Mar 28, 2007 07:57 AM
Perl necklace Phoenix25 Jewelry 3 Feb 27, 2007 04:20 PM
orca/ enviroment ciara Zoology 1 Nov 26, 2005 01:21 PM
Need help with Perl!! dragonfly11 Perl 2 Jul 26, 2005 05:56 AM
Map home drive on a Mac enviroment from WIndows 2000 Server R1cK Networking 0 May 7, 2005 07:22 AM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 04:53 PM.