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
myshell-script.sh#!/bin/sh blah=/tmp/test balh3=/xyx/zzz
myperl-script.pl#!/bin/sh source myshell-script.sh ...do something...
I need some simpler&shorter solution, not f.e.:#!/usr/bin/perl ..what to do here...
Also what i should do if i decice to put some code..:"), probably not but in any case...open FILE ..; undef $/; $x =<FILE>; %hash = split /=/, (split /\n/, $x); close FILE ..;
thanx
update (broquaint): added <code> tags and fixed formatting
Title edit by tye
Back to
Seekers of Perl Wisdom