On Mon, Jun 25, 2001 at 08:42:11AM -0400, Craig Moynes/Markham/IBM wrote:
> >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.";
> }

All absolutely correct, but totally useless :-(

Well, mostly anyway.

You'll need to run a ksh, source the script, run env or something and
look at the output.

I've been running something like that for years for csh scripts, but
easily modified for other shells provided you can work out the correct
shell syntax.  It essentially diffs the environment before and after
running the command.  There's also a little bit on the end that outputs
the results in sh format which I use to source csh scripts from sh.

Anyway, I've been meaning to package it up properly and stick it on CPAN
for ages.  I'll see if I can get something done within a week if you can
wait that long.  If not, mail me directly and I'll send you what I've
got (no docs).

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to