http://www.perlmonks.org?node_id=301546

bugsbunny has asked for the wisdom of the Perl Monks concerning the following question:

hi,

I have some shell scripts and some perl scripts.. I store some paths and other variables as shell script.. Now I want to be able to import these vars into my perl-scripts.. ex.:

myenv.sh

#!/bin/sh blah=/tmp/test balh3=/xyx/zzz
myshell-script.sh
#!/bin/sh source myshell-script.sh ...do something...
myperl-script.pl
#!/usr/bin/perl ..what to do here...
I need some simpler&shorter solution, not f.e.:
open FILE ..; undef $/; $x =<FILE>; %hash = split /=/, (split /\n/, $x); close FILE ..;
Also what i should do if i decice to put some code..:"), probably not but in any case...

thanx

update (broquaint): added <code> tags and fixed formatting

Title edit by tye