Re: Read from Apache error.log
[prev]
[thread]
[next]
[Date index for 2005/03/27]
> Admittedly, I should have read your original post more closely. The program your calling with system fails, not the system call itself, so eval would not catch this. Have you considered using the backtick operator and inspect the output for errors? This might not be feasible if the called program has a large amount of output that might mimic what error text you're looking for.
>From perldoc -f system : (excerpt)
The return value is the exit status of the program as returned by the
"wait" call. To get the actual exit value shift right by eight (see
below). See also "exec". This is not what you want to use to capture
the output from a command, for that youshould use merely backticks or
"qx//", as described in "‘STRING‘" in perlop. Return value of −1
indicates a failure to start the program (inspect $! for the reason).
Also, look at : perldoc perlfaq8, starting with the question :
"Why can’t I get the output of a command with system()?"
________________________________________________________________________
Clinton Gormley clinton@xxxxxxxxxx.xxx
www.TravelJury.com - For travellers, By travellers