($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time+$addsecs); @months = ("1","2","3","4","5","6","7","8","9","10","11","12"); @days = ("Sun","Mon","Tue","Wed","Thur","Fri","Sat"); if ($sec < 10) {$sec = "0$sec";} if ($min < 10) {$min = "0$min";} if ($hour < 10) {$hour = "$hour";} if ($hour > 11) {$ap = "PM";} if ($hour < 12) {$ap = "AM";} if ($mday < 10) {$mday = "0$mday";} if ($hour eq 00) { $hour = "12"; } if ($hour > 12) { $hour = ($hour - 12); $ap = "p.m."; } $millyear = $year + 1900; $date = "@days[$wday]:$mday:@months[$mon]:$millyear"; $time = "$hour:$min:$sec:$ap:$date"; use DB_File; # optional; overrides default tie %who, "DB_File", "$path/whosonline" or die "Can't open FILENAME: $!\n"; # open database tie hash to db $who{$Account::account} = "$time"; #account-value time-key @person = keys(%who); foreach $timer (values %who) { ($hr, $mins, $secs, $appm, $day, $daynumber, $month, $year) = split(/:/, $timer); print <