in reply to printing and logging to a file

well, i don't know anything about a module for printing to multiple streams. if you're on a unix system, you could use a system call to 'tee.'

i rolled my own sub a long time ago, when i was pretty new to perl, and wanted the excersize. i dug it up for you:

#! /usr/local/bin/perl -w use strict; use FileHandle; use Getopt::Std; use vars qw($opt_n); die( "Error: No arguments passed.\n" ) unless( $#ARGV >= 0 ); my $text = pop @ARGV; die("no opts\n") unless getopts('n'); unless ( $opt_n ) { print $text."\n"; } while ($ARGV[0]) { $_ = shift; my $FH = new FileHandle ">>$_" or die( "oops! $!\n" ); print $FH $text."\n"; close( $FH ); }
i used it like so:
mprint($::AUDITLOG, $::BUILDLOG, " ** dbcfg.tmp file in $::BUILDPATH n +ot found * Run Aborted!!!");

~Particle