Solaris will always check your .cshrc file when running which, regardless of your shell. I'm not sure of any way around this other than fixing your .cshrc file.
The suggestion to use File::Which is a good one. Relying on a backtick command invariably introduces portability problems, which require a lot of defensive coding to work around (hence the astounding complexity of GNU configure and the like.)
In reply to Re^3: backticks problem
by bigmacbear
in thread backticks problem
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |