On Fri, Jan 16, 2004 at 05:02:52PM -0800, Larry Guest wrote: > I have a small script that does some admin work for me. > > What I need to do now is not only have is display information to STDERR > and STDOUT but also write the same information I see when I run the > command to a file. > > I have written it for others who are not very technical. I want them to > be able to see the script working and what it is doing. But I also need > a log file of the same information so I can have it mailed to me and > keep a copy on the server. > > I cant seem to get this to work.
You don't say what OS you are on, but on *nix I would do something like: $ perl -le 'print STDERR "stderr"; print "stdout"' 2>&1 | tee output.txt Solutions in Perl take more effort, but we can discuss them if necessary. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>