gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to find a path to some executable from within my program using my @path = `which myprog`;. Running this on my linux box gives me either the correct path (if found) or which: no myprog in ($PATH).
The same program running under Solaris has a different behavior. Apparently, which for some reason tries to source my $HOME/.cshrc file, which has a problem, and therefore @path has the error message from sourcing .cshrc instead of actual path. How can I bypass this behavior? (ie, don't run backticks interactively).
Update Running any command other than 'which' seems to be NOT sourcing $HOME/.cshrc
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: backticks problem
by adrianh (Chancellor) on Aug 06, 2004 at 19:49 UTC | |
|
Re: backticks problem
by blue_cowdawg (Monsignor) on Aug 06, 2004 at 19:50 UTC | |
by gri6507 (Deacon) on Aug 06, 2004 at 20:11 UTC | |
by bigmacbear (Monk) on Aug 06, 2004 at 20:24 UTC |