2008/10/26 AaronLS <[EMAIL PROTECTED]>: > I am trying to modify an existing script that uses MIME::Lite->send > > I am trying to take any debug output and send it through a Debug > function which goes to a log file so I can see if there is an error. > Am I doing this correctly?: > > I'm not using die because I think that sends it to stdout. The > documentation for "Debug=>1" also says it sends it to stdout. How do > I redirect it into a string variable or something that allows me to > output it to a file?
could use a select for the wanted output: open HD,">>", "/tmp/a.txt" or die $!; my $old = select HD; the_debug_statement; select $old; -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/