Weizhong Dai wrote:
Hi all, In my script, I have a system call, and redirect the stderr to a file. # # open STDERR, ">$workpath\\error_log.txt"; # system "..."; # but I only want the ERROR messages to be logged in the file. Is there any method to filter the WARNING messages generated by the system call. Thanks.
You're talking about the warnings generated by the program in the system call, not something perl generates, correct?
If so, check the documentation on the program to see if warnings can be suppressed. If not, then what are the criteria that separates the warnings from the errors? Once you know that, you can write a filter to remove them.
-- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. Eliminate software piracy: use only FLOSS. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/