You could "read" in the .cfg file with a normal open( FN, "filename.cfg" )
then 
while ( <FN> ) {
        my ($key, $value) = split ( /=/ ); #might be off on this one... the
split that is
        my $myenv{$key} = $value;
}

that _should_ generate a hash with the env variables you have in the file,
that is if they are key=value....

Ron



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 25, 2001 9:22 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: environment-Variable from korn-schell to perl
> 
> 
> 
> 
> 
> > >I have to source a KORN-Shell Script, so that the 
> environment-Variables
> > >created by
> > >KORN-Shell is available in my PERL-Script. Ho do I that ????
> > 
> > 
> > The hash %ENV stores the environment variables.
> > 
> > if ( $ENV{HOME} =~ /dave/ )
> > {
> >      print "Good morning Dave.";
> > }
> > 
> > http://www.perldoc.com/perl5.6/pod/perlvar.html
> > 
>       [>>]  no that's not what I need.
>       I have to source the KORN-Shell Script during executing my
> PERL-Script.
> 
>       example:
>       #!/usr/bin/perl
>       print $ENV{XYZ}           ### nothing in it
>       #
>       # now I have to source the KORN-SHELL Script
>       # but I don't no
>       . kornshel.sh    ## ????
> 
>       print $ENV{XYZ}          ##  now it Prints my environment
> 
> 
>       Greetings    Peter
> 

Reply via email to