in reply to setting up a csh from perl

You may want to just open a pipe:
open CSH, "| csh -f -DHOME=new -DPATH=." || die "Open failed";
It sounds like you have the whole picture:
my $child = fork; die "Fork failed" if not defined $child; if ( $child ) { # parent stuff } else { #child %ENV = ( what => 'ever', you => 'need' ); exec( ... ) || die "exec failed: $!"; }
Be well,
rir