in reply to Perl system calls in csh Not executing!

An alternative to opening a pipe as graff suggests (which is a perfectly find solution) is to make an executable shell script that does everything you want and then invoke it with a single system call. This has the advantage that it will probably be useful to you on the commandline as well. For example, make a file called ~/bin/foo and make it executable and contain the source:
#!/bin/csh source /exlibris/aleph/a16_1/aleph/proc/unset_lib_env if( $? != 0 ){ exit 1 } # i guessed at the whole syntax here source `/exlibris/aleph/a16_1/aleph/exe/dev_aleph gpo01`/gpo01/prof_li +brary if( $? != 0 ){ exit 2 } # i guessed at the whole syntax here echo $data_root if( $? != 0 ){ exit 3 } # i guessed at the whole syntax here
Note invoke it like $rc = system('/home/yourname/bin/foo'); And then you can inspect $rc >> 8 for the actual exit code to see if it error'd or not. (see perldoc -f system for more details)

Side note: Csh Programming Considered Harmful

re: your original code -- note that the $data_root will be interoplated by perl .. to avoid that and pass the literal $data_root to echo you have to escape it like "$program echo \$data_root" or better yet use the multi-parameter syntax of system (perldoc -f system) and do system($program, 'echo $data_root');