Why on Earth are you directing this question here? The perl6-internals
mailing list is about the internals of the new Perl6 implementation.

++Jos.nl

On Fri, Aug 29, 2003 at 03:05:35PM +0530 it came to pass that Janarthanan, Prassana 
wrote:
> 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

-- 
ek is so lug jy vlieg deur my
sonder jou is ek sonder patroon
   "Breyten Breytenbach"

Reply via email to