It seems to me the answers given so far are too complicated because everyone wants to write Perl where they don't need it. You want a shell script instead. Source the environment file to set up the environment, then start the Perl script.
#!/bin/sh source /etc/profiles/bashrc.ora.v.10 perl program.pl
And, if your Perl program is already running and the profile file has changed, you can exec the script again, effectively starting fresh.
In reply to Re: How to change a script's environment after the script is already run, based on shell sourcing ?
by brian_d_foy
in thread How to change a script's environment after the script is already run, based on shell sourcing ?
by ronbarak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |