i know that i can start external progams using system
or some kind of open(PROCESS,'<programname> |')
. As far as i know both variants return either the return code of the called program (e.g. 0 for success, 1 for error) or the return values sent to stdout. I need an blocking call like system()
and all three output values.
Let me explain what i want to accomplish. I want to call "apachefop" to generate some pdfs. apachefop prints massive warnings on stdout/stderr. Exceptions where displayed on stdout/stderr either. i want to log all the displayed errors and warnings only if the program did exit with an error. if it exits successfully i want to ignore the warnings.
i hope you can help me or point me to the right direction. Ah before i forget it, i am using Perl 5.8.8 in an Apache/mod_perl environment.