sub clock { my $minutes = shift; my $hh = floor($minutes/60); my $rest = $minutes - $hh*60; if (length($rest) == 1) {$rest = "0".$rest} return "$hh:$rest"; }