The underlying reason for doing this is that there are several commands such as cp, cd, uname, etc that I need to use alternate versions while using an NFS mounted file system that cannot handle several special cases such as hard/soft links in a UNIX style fashion, and special code needs to be called to handle these kinds of issues. Unfortunately when trying to use `cp` in perl I am getting the wrong version since the PATH is coming from the newly instantiated csh and not from the enviroment that perl is running in.
I believe that the standard practice to get csh to do a 'fast' login is to use the -f switch and then it will avoid loading up the .cshrc and thus wouldn't overwrite the currently setup environment and variables.
Is there any variable or parameter in perl that can be set to tell it for example to use "csh -f" for the enviroment, or perhaps set it to "ksh" or "bash" for the shell? I've tried looking through all the docs, and while I believe system called through a multi parameter mode would avoid the shell (and probably do what I want) it only returns a status code of the program run and not the actual contents. Having to pipe the output to a file and then reading that in is perhaps a bit more complicated than the intended fix.
Thanks in advance for any hints or clues that may help me out here!
In reply to Specifying a shell for use with Backticks by gaspodethewonderdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |