in reply to how to set environment vars
To elaborate slightly, in linux land, processes can not change their parent's environment. Children typically inherit their parent's environment but when you exit a process, any changes you've made to the environment are lost. This means that when you use "system" to execute your CSH script, any changes it makes to the environment are lost when it exits and your perl script will never see it.
The best solution is to print your values to STDOUT or just have perl parse the CSH or some such.