I have a file "temp.txt" containing
var1=hello
var2=ello
var3=mello
....and a long list
in unix shell we can simply use . temp.txt
is use all the variables in the file..
do we have a similar function in perl or any work around..
I tried a workaround
$ cat checkDOTfuctionOFunix.ksh
#!/bin/ksh
. /export/home/temp.txt
#export
/export/home/checkDOTfuncPRINTSinPERL.pl
$ cat /export/home/checkDOTfuncPRINTSinPERL.pl
#!/usr/local/bin/perl
print "var1=$ENV{var1} \n\n var2=$ENV{var2} \n\n";
but this wont work unless I export each value which can be done with simple sed -e 's/^/export/
but I prefer not to do this. please help :)