in reply to Perl/UNIX .profile problem

The .profile is executed in a separate shell, which loads all the values, and then exits again, making all changes to the environment void. So you will need to employ something like tillys RE (tilly) 3: Get default login environment, which will import the environment set up by a shell script into the environment of the calling Perl process.

Replies are listed 'Best First'.
Re^2: Perl/UNIX .profile problem
by Ronnie (Scribe) on Nov 18, 2004 at 10:45 UTC
    I downloaded the code you suggested but there appears to be an error in it! When I attempt to test it I get the following error -
    syntax error at xxrcprofsub.pl line 8, near "m/^(.*?)=((?:[^\n\\]|\\.| +\\\n)*)/gm ;"
    Cheers, Ronnie

      There's a closing ) missing on that line. Add it and the code will run... or see 408740.

      Cheerio, Sören