Cannot capture message from external program.

From: Hon Seng Phuah (hsphuah_at_usa.com)
Date: 03/30/04


Date: 29 Mar 2004 17:39:35 -0800

I have the following code:

$file_name = $_[0];
@output_result = `cvs commit -m\"\" $file_name`;
print "Here: @output_result\n";

or

$file_name = $_[0]
open(OUTPUT, "cvs commit =m\"\" $file_name |");
@output_result = <OUTPUT>;
close(OUTPUT);
print "Here: @output_result\n";

Both code displays:

cvs commit: Examining .
Here:
Use of uninitialized value at test.pl line #.

How do I capture the output error message, "cvs commit: Examining ."
and store them into @output_message.