Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub LOGGIN { .... open(LOG, ">>$log") or croak "Unable to append to $log: $!"; print LOG "[$localtime] $log : @data \n"; close LOG or die "Cannot close log file:: $log : $!\n"; .... }
#test code my $i=0; for (my $count=1; $count<11; $count++) { $i++; app_log($log,"Loading transac from \$file - $1"); print "cool<br>"; }
[Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac [Fri Feb 14 09:28:30 2005] test_of_log.txt : Loading transac ....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Localtime Updating
by ikegami (Patriarch) on Feb 24, 2006 at 15:20 UTC | |
by Anonymous Monk on Feb 24, 2006 at 15:45 UTC | |
by duff (Parson) on Feb 24, 2006 at 15:59 UTC | |
by Anonymous Monk on Feb 24, 2006 at 16:08 UTC | |
by duff (Parson) on Feb 24, 2006 at 18:52 UTC | |
by davorg (Chancellor) on Feb 24, 2006 at 16:00 UTC | |
by Anonymous Monk on Feb 24, 2006 at 16:09 UTC | |
by davorg (Chancellor) on Feb 24, 2006 at 16:41 UTC | |
by Anonymous Monk on Feb 24, 2006 at 16:05 UTC | |
|
Re: Localtime Updating
by duff (Parson) on Feb 24, 2006 at 14:57 UTC | |
by Anonymous Monk on Feb 24, 2006 at 15:25 UTC | |
by davorg (Chancellor) on Feb 24, 2006 at 15:29 UTC | |
|
Re: Localtime Updating
by davorg (Chancellor) on Feb 24, 2006 at 15:14 UTC | |
by ikegami (Patriarch) on Feb 24, 2006 at 15:18 UTC | |
by kwaping (Priest) on Feb 24, 2006 at 15:19 UTC | |
by Fletch (Bishop) on Feb 24, 2006 at 16:34 UTC | |
|
Re: Localtime Updating
by chargrill (Parson) on Feb 24, 2006 at 18:45 UTC |