Hi all,

Can any one tell me as how should I source a file. Which exports environment
variable? Something like this...

FileName= ".myenv"
---------------------------------------------------------
#! /usr/local/bin/bash 

export var1;      va1=/u/janarthp/perl
export var2;      va2=/u/janarthp/perl2
export var3;      va1=/u/janarthp/perl3

---------------------------------------------------------

I want to source this file inside a perl script. One criticle thing is, this
file is bash. So I have to use `. .myenv` to source the file.

FileName= "myperl.pl"

----------------------------------------------------------
#! /usr/local/bin/perl -w

My $code = "`. .myenv`"

Eval($code);

Print $ENV{var1};
Print $ENV{var2};
Print $ENV{var3};
----------------------------------------------------------
No Output.

Can I just run this command in perl  using backticks ? If yes, another
problem is my perl's backticks takes generally the cshell and not bash, so
there could be an error. 
Please advice.

-Prassana

Reply via email to