Hi all,
Thank u for your help :)
On 03/22/2007 03:16 AM, lakshmi priya wrote:
Hi,
How do I redirect the warning messages from my perl script to a
different file? By default they are all getting printed on the terminal.
In addition to Jeff Pang's suggestion, read "perldoc -f open". You can
redirect STDERR to a file:
>
>Or print STDERR "error message" in your program.
>
This is not good because warning info are most likely generated by Perl parser
not your programs.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
>
>Hi,
> How do I redirect the warning messages from my perl script to a
>different file? By default they are all getting printed on the terminal.
Hello,
You can redirect all 'die' or 'warn' messages to files via re-defining the
SIGDIE and SIGWARN handler.
Like:
$SIG{__DIE__} = \&log_di
./script.pl 2> err in unix.
Or print STDERR "error message" in your program.
-Original Message-
From: lakshmi priya [mailto:[EMAIL PROTECTED]
Sent: 22 March 2007 08:16
To: beginners@perl.org
Subject: how to redirect warnings to a file
Hi,
How do I redirect the warning messages f