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

In reply to Re^12: Unix Aliases? by Ronnie
in thread Unix Aliases? by Ronnie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.