in reply to backticks problem

If your .cshrc is being sourced in that seems to mean to me that your $ENV{SHELL} is set to /bin/csh or /bin/tcsh. Have you tried setting it to /bin/sh or some other shell? You could also try using File::Which instead of using the *nix command within backticks.

Replies are listed 'Best First'.
Re^2: backticks problem
by gri6507 (Deacon) on Aug 06, 2004 at 20:11 UTC
    Ok, so i tried
    use strict; $ENV{SHELL} = '/bin/bash'; my $i = `which prog`; print "$i\n";

    and I still get the error message from sourcing .cshrc

      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.)