|The stupid question is the question not asked|
How to set (environment) variables for the scriptby Skeeve (Vicar)
|on Jun 10, 2010 at 13:04 UTC||Need Help??|
Skeeve has asked for the
wisdom of the Perl Monks concerning the following question:
Hi fellow monks!
I have a shell script (set_env.sh) which sets some variables. It is usually sourced from other shell scripts.
Now I have a perl script which needs these settings too. So usually I call my script like this:
But I don't like this ;-) One way would be to use a wrapper script containing these 2 commands, but I don't like it too much.
So is there a way to get my script to call set_env.sh and use its settings?
My idea was to do it something like this (incomplete pseudocode) at the very beginning of the code of myscript
Is there a cleaner way? What do you suggest?