Peter, et al -- ...and then Peter Scott said... % % At 09:33 AM 7/6/02 -0500, David T-G wrote: % >I want to add to $ENV{'PATH'} in the parent process from my script. % >Generally I know this isn't allowed, but I wonder if there's a way to do % >it. % % No. It's a Unix FAQ and Perl can't do it any more than any other % language. See 2.8 in http://www.faqs.org/faqs/unix-faq/faq/part2/
Yeah. I was hoping for a way to . myscript.pl bash source myscript.pl tcsh or maybe `myscript.pl bash` `myscript.pl tcsh` for that would make it work, but I haven't found anything yet. The script spits out PATH=/new/info/in/path:$PATH (in bash mode, anyway) and the like and I've tried loading *that* with all sorts of eval `myscript.pl bash` and the like but I still can't get it to work (whether I spit out a comment or a VAR=value line, bash complains "command not found"). It sounds like I've hit on a curious shell challenge, and I hope I don't have to resort to myscript.pl bash > $HOME/.includeme.bash myscript.pl tcsh > $HOME/.includeme.tcsh and . $HOME/.includeme.bash source $HOME/.includeme.tcsh in my scripts; sure, I'd save on the time to start perl every time I run a script, but I'd have to have a cron job to make sure that the includeme files are kept up to date instead of spitting out the data dynamically. Anyway, this thread careening off-topic and I should let it die :-) % -- % Peter Scott % Pacific Systems Design Technologies % http://www.perldebugged.com/ Thanks & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg27192/pgp00000.pgp
Description: PGP signature