can we source a shell script in the perl script??
Example: Program 1:
cat test1.sh
#!/bin/ksh
DATE=/bin/date
program 2:
<
Uhm.. is the below cheating?
#!/bin/sh
. ./test1.sh # source the test script
echo Bash says $DATE
export DATE; # KEY to have the below Perl bit see $ENV{DATE}
perl <<'ENDPERL';
print "Perl says $ENV{DATE}\n";
ENDPERL
The problem is that sourcing the sh file may do whatever, and not just assign value X to variable Y...