in reply to Parallel::ForkManager run_on_finish Canot get Exit Code of Child process
`curl -o /dev/null -m 222 \"$Link\" 2>> $logFile`; my $curlResult = `echo $?`;
That code is quite convoluted.
Each `...` call starts a separate shell, so the second shell doesn't know the return value of a program started in the first shell. And even if it would, you'd not ask it for the return value of the previously launched program, because you interpolate the perl variable $? -- which you could use directly anyway.
But there are more robust ways to interface curl anyway, for example WWW::Curl and LWP::Curl.
|
|---|