(Mohsin) wrote in message news:<. com>...
> Subject: How to Control the default Unix Shell from Perl
IIRC you can only do this at build-time in Unix. (On Win32 there's a
registry entry).
> My question is "How to explicitly specify a Korn shell to
> be used by perl?"
That is a different question - you don't want to change the _default_,
just tell Perl to use something else. That you can do.
> open( OUT, "| $cmd ");
my $chosen_shell = '/usr/bin/ksh'; # Or just 'ksh' or $ENV{SHELL}
open( OUT,'|-',$chosen_shell,'-c',$cmd)
or die "Can't spawn $chosen_shell: $!";
Note - the list syntax for pipe-opens is a recent feature.
Working out what unpleasant quoting you'd need on older Perls to get
/bin/sh to run you chosen shell, is left as an exercise for the
reader.
This newsgroup does not exist (see FAQ). Please do not start threads
here.