There are some good answers here so far, but I'd like to recommend a
logging module like Log::Log4perl. If your script is more than a run-once
throwaway, proper logging will almost certainly be of benefit.
Metacpan: https://metacpan.org/module/Log::Log4perl
FAQ:
http://log4perl.sourceforge.net
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
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 = 'one
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 severa
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 = 't
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';
open(
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 "Ca