On 8/29/06, Ken Foskey <[EMAIL PROTECTED]> wrote:
I have a daemon process that works but I am currently running it with
script.pl > error.log 2>&1
and I want to do the same thing without using the redirection,, remove
the human error when starting the program.
I can `open( STDERR, '>', 'error.log') ...` but is there a piece of
magic to duplicate that to STDOUT as well (ie same file output)
Ta
Ken Foskey
From command line, you could use tee( man 1 tee).
After a quick search, I found a perl module that presumably does the
same thing:
http://72.14.221.104/search?q=cache:Dhsd4uX1QboJ:jenda.krynicky.cz/perl/TeeOutput.pm.html+tee+perl&hl=en&ct=clnk&cd=1&client=firefox
Hope this helps.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>