setting several environment variables in the current shell process
[email protected] (Gaurav Arora) Mon, 20 Sep 2004 12:58:07 +0530
| Newsgroups | perl.trainers |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am writing a perl script (environment.pl) which sets several
environment variables which have to be applied to the current shell process.
I have set the values in the perl script using $ENV{'var1'} = "aaa"
syntax. This would set the environment variables for the perl script
process and the child process. But I want the environment variables to
be accessible from the shell which invoked the perl script ( i.e.
$./environment.pl).
In csh based scripts, I can use the 'source' keyword, or in 'sh' based
scripts, I can use the '.' symbol. But what would be the equivalent in
Perl ?
Please help. I have chosen to use Perl scripting language instead of
Shell scripting as the script has to be shell type independant.
Thanks & Regards,
Gaurav Arora,
Texas Instruments,
India.