
BillKSmith
Veteran
Oct 26, 2017, 8:34 AM
Post #10 of 21
(9809 views)
|
Re: [digioleg54] How can I read UNIX nvironment varaibles in Perl script?
[In reply to]
|
Can't Post
|
|
You have several errors. The worst of which is that the perlenv_add file is a script rather than a module. Even if everything works as you expect up to the exit statement, it would terminate everything. I cannot tell from your post if perlenv_add.pl is in one of the @INC directories. None of your "use lib" statements appear to be necessary. The only one that I used is necessary, under some versions of perl, to find a module in the current directory. Your use of 'system' rather than 'exec' would probably work, but exec does exactly what is appropriate. I had another idea. Perhaps you could ask you system administrator to create a new 'user' just for these twenty applications. He could initialize the environment at login. You would not have to be concerned about it at all. Good Luck, Bill
|