Re: Read from Apache error.log

[prev] [thread] [next] [Date index for 2005/03/27]

From: Clinton Gormley
Subject: Re: Read from Apache error.log
Date: 14:08 on 27 Mar 2005

> 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



Read from Apache error.log
Femi Oshagbemi 11:47 on 27 Mar 2005

Re: Read from Apache error.log
Rodger Castle 11:59 on 27 Mar 2005

Re: Read from Apache error.log
Femi Oshagbemi 12:30 on 27 Mar 2005

Re: Read from Apache error.log
Rodger Castle 12:39 on 27 Mar 2005

Re: Read from Apache error.log
Clinton Gormley 14:08 on 27 Mar 2005

Re: Read from Apache error.log
Stas Bekman 15:08 on 27 Mar 2005

Generated at 09:30 on 27 Apr 2005 by mariachi v0.52