> Hello, im very new to the perl, modperl and apache combination. > So am I, but I think I have a usable solution for you.
> I am invoking another program from within my perl module using a > 'System(...)' call. Although the call is successfull, there are times when > the invoked program may terminate with a 'parse error:' for example, and > theses are logged in the error.log. Is there a way the catch or read this as > it happens and display to the browser? Here's what I do ... add the line use Carp; to your Module list (checkout the perldocs on it for full details) Wrap your call in an 'eval {};' block. Example ... eval { System.call (...); # This is the call that you're expecting an error from }; ## Don't forget the semi-colon if ( $@ ) { $r->print ( "Uh oh. Error found: $@" ); carp ( $@ ); } The eval acts as an exception handler. There is some discussion on the mod_perl site for using eval and Carp for exception handling. Hope the helps. Rodger