I am trying to write a subroutuine I can use for logging, more to get
familiar with PERL concepts than anything else, but don't understand why it
is failing. I am sure it is blatantly obvious, but I might as well be
staring into a hole in the ground.
It fails on the printf statement in the subroutine.

TIA

Conor


$date=gmtime();
print "\nScript started at $date\n";
logger("Script started at $date\n") || die "Cant log\n";

sub logger($detail)
{
open (LOGFILE, ">>AV_audit.log") || die "Countnt open log file : $!\n"; 
printf LOGFILE "$detail" || die "Print failed : $!\n";
close(LOGFILE);
}


The information in this email is confidential and may be legally privileged. It is 
intended solely for the addressee. Access to this email by anyone else is 
unauthorised.if you are not the intended recipient, any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance on it is 
prohibited and may be unlawful. Please note that any views, opinions or advice 
contained in this email are those of the sending individual and not necessarily those 
of the firm. It is possible for data transmitted by e-mail to be deliberately or 
accidentally corrupted or intercepted. For this reason, where the communication is by 
e-mail, J&E Davy does not accept any responsibility for any breach of confidence which 
may arise from the use of this medium. If you have received this e-mail in error 
please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from 
your system.

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to