Print to several logs

2013-08-27 Thread Harry Putnam
I happen to be scripting something that needs to have two logs written to and was sort of taken by how awkward this construction looked: (Simplified for discussion, from a longer script) my $rsync = 'rsync'; my $tmplog = 'one.log'; my $tmplog2 = 'two.log'; open(LOG,$tmplog)or die Can't

Re: Print to several logs

2013-08-27 Thread John W. Krahn
Harry Putnam wrote: I happen to be scripting something that needs to have two logs written to and was sort of taken by how awkward this construction looked: (Simplified for discussion, from a longer script) my $rsync = 'rsync'; my $tmplog = 'one.log'; my $tmplog2 = 'two.log';

Re: Print to several logs

2013-08-27 Thread Nathan Hilterbrand
See reply below, please I happen to be scripting something that needs to have two logs written to and was sort of taken by how awkward this construction looked: (Simplified for discussion, from a longer script) my $rsync = 'rsync'; my $tmplog = 'one.log'; my $tmplog2 = 'two.log';

Re: Print to several logs

2013-08-27 Thread Jim Gibson
On Aug 27, 2013, at 2:14 PM, Harry Putnam wrote: I happen to be scripting something that needs to have two logs written to and was sort of taken by how awkward this construction looked: (snipped) Check out the IO::Tee module from CPAN. I have not used it, but it is mentioned in several

Re: Print to several logs

2013-08-27 Thread Rob Dixon
On 27/08/2013 23:06, John W. Krahn wrote: Harry Putnam wrote: I happen to be scripting something that needs to have two logs written to and was sort of taken by how awkward this construction looked: (Simplified for discussion, from a longer script) my $rsync = 'rsync'; my $tmplog =

Re: Print to several logs

2013-08-27 Thread Nathan Hilterbrand
Jim, *much* better. I did a search for something like that before I wrote what I did, but I guess I didn't get the search terms right, because I didn't find it. Very cool Nathan On Aug 27, 2013, at 2:14 PM, Harry Putnam wrote: I happen to be scripting something that needs to have two