in reply to execute csh file from perl script
See Get default login environment if you want the environment variables set up by the child script to be available to your Perl script.
Update
As discussed in the CB, RE (tilly) 3: Get default login environment has most of what you need. You might need to adapt the shell invocation to run your script instead of the default login setup:
sub get_login_env { local %ENV; my $csh = shift; my $env = `$csh ; env`; if (wantarray) { my @pieces = ($env =~ m/^(.*?)=((?:[^\n\\]|\\.|\\\n)*)/gm); s/\\(.)/$1/g foreach @pieces; return @pieces; } else { return $env; } }
|
|---|