redirect output to log file

hello all,

I'm invoking the program generate-report using backticks from my perl program and redirecting the output to the log file sge-stderr.log. But when i check the process using ps command it is spawing two processes where the below code is parent process and the program generate-report as child.

Please help me out of how to redirect the output to the log file without spawing two process.

`/usr/bin/perl /opt/finance/bin/generate-report $urid 2>> /opt/finance/logs/sge-stderr.log`;

Thanks a ton,
raj

When you use the system() or the backticks in perl, the program will do a fork and exec. This will result in two processes. Why is there a restriction on the number of processes that you can create?

one process has sh -c at the beginning of /usr/bin/perl /opt/finance/bin/generate-report $urid 2>> /opt/finance/logs/sge-stderr.log at the beginning and actual program opt/finance/bin/generate-report $urid is running which is the child process of first one.

Will there be any impact or two processes are making the same program running twice... iam confused :confused:

Please explain me...