That is actually what the code does. The perl code is generated by the C, then sprintf(cmd,"perl perlfile.pl"); system(cmd);.Also, like I said earlier, it is just ONE process that is both successful and unsuccessful at the same time. Since the process is started, the environment is not changing, so I don't see how that could have any effect on anything.