in reply to problem in running UNIX command through perl

What happens if you do the following within perl?

`egrep -f temp_qc_file.txt temp_qc_running_file.txt > temp_file.txt`;
i.e. just a string wihout variables.

If the problem is still there, than check paths. Do you run you perl script from the same location as unix command?