Jeff Pang wrote:
open (HDW,">>",$err_log)
or die "Can't open log file $err_log: $!\nError: "[EMAIL PROTECTED];
print HDW $time," ",@_
or die "Can't write to log file $err_log: $!\n Error: "[EMAIL
PROTECTED];
Thanks,Jay,you are more exactly.
I don't use the 'or die ...' statements on this case,is because my script is a
daemon,it re-direct all its stdout,stdin,stderr to /dev/null.So even I use
these odditional statements,I still can't see the output on screen.
--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com
I always thought it would work as follows:
* If it's started in a terminal, the output will appear in that
terminal, even if started in background and with nohup(1).
* If it's started by cron(1), the output is gathered and e-mail to you
when the program terminates.
* If it's started by init(1), the output is send to the console log.
--
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them,
we learn by doing them."
Aristotle
"The man who sets out to carry a cat by its tail learns something that
will always be useful and which will never grow dim or doubtful."
Mark Twain
"Believe in the Divine, but paddle away from the rocks."
Hindu Proverb
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>