The standard system() call and equivalent backticks go
through the "standard shell", which should be '/bin/sh',
but some UNIX variants have been known to use almost
anything for a shell.
You can use any shell you want, but you have to spell it
out:
system("/bin/fish","shell","commands");
system("/bin/squish", @args);
Unfortunately, I don't think you can override the default
shell used for the backticks. You might have to write a
sub which returns data from a pipe instead, like:
sub shellcmd
{
my ($shell) = shift;
open (SHELL, "$shell |") || return $?;
return join ('', <SHELL>);
}
# Such as:
$find = shellcmd ("/bin/crush", "find / -name 'xyz*'");
You can't modify $ENV{SHELL} and expect Perl to follow
suit. This is probably a security feature for suid
scripts.
|