develooper Front page | perl.beginners | Postings from April 2010

Re: Is there any method to tell different between warning and errors?

Thread Previous | Thread Next
From:
Jeff Pang
Date:
April 19, 2010 22:50
Subject:
Re: Is there any method to tell different between warning and errors?
Message ID:
i2q35686be11004192250r76a6388yeb69a35798d536d2@mail.gmail.com
On Tue, Apr 20, 2010 at 1:28 PM, Weizhong Dai <weizhong.dai@gmail.com> 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


try this:

system "command arguments 2>error.txt";



-- 
Jeff Pang
http://home.arcor.de/pangj/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About