You were absolutely spot on regarding the non-export of TWO_TASK being the problem. The alias doesn't work though; I didn't think it would as when the .profile is processed via the ksh the lines referring to the aliases are not actioned. ( I put a print in for each of the elements in @envlines and they didn't show up). When the call to the alias is made the shell reports - ksh: ISWTEACH: not found.
The toy town test script that I'm using follows -
#!/usr/bin/perl -w
#
use lib "/home/interface/scripts/Perl_Modules" ;
#
sub getenv
{
my $profile = shift;
my @envlines = (`exec ksh -c ". $profile; ISWTEACH; env"`);
open OPF, ">myxxrcdata" or die "\n\tBugger: $!\n" ;
foreach (@envlines)
{
chomp;
next unless /=/;
print "$_\n" ; # No alias lines appear
print OPF "$_\n" or die "\n\tIt's nae use captin: $!\n" ;
my ($var, $value) = split(/=/, $_, 2);
$ENV{$var} = $value;
}
#
close OPF or die "\n\tShit... I mean oh Dear!\n" ;
#
return 1 ;
#
} # END - getenv
#
####################################
# Variables #
####################################
#
$file = '/home/rcruickshank/Perl/xxrc_inter_prof.pl' ;
#
####################################
# Processing #
####################################
#
print "\n\t<***** SOR *****>\n" ;
#
getenv("$file") or die "\n\tIt didnae run min! : $!\n" ;
#
print "\n\tOracle SID :: $ENV{ORACLE_SID}\n" ;
#
print "\n\t<***** EOR *****>\n" ;
If it's not something obviously stupid that I'm doing I think I'll just use the boring 3 hash tables idea.
Thanks for all your help,
Ronnie |