aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-103/adam-russell/blog.txt1
-rw-r--r--challenge-103/adam-russell/perl/ch-2.pl2
2 files changed, 2 insertions, 1 deletions
diff --git a/challenge-103/adam-russell/blog.txt b/challenge-103/adam-russell/blog.txt
new file mode 100644
index 0000000000..5924dd93b8
--- /dev/null
+++ b/challenge-103/adam-russell/blog.txt
@@ -0,0 +1 @@
+http://www.rabbitfarm.com/cgi-bin/blosxom/perl/2021/03/14
diff --git a/challenge-103/adam-russell/perl/ch-2.pl b/challenge-103/adam-russell/perl/ch-2.pl
index 802892d875..42c6f6d38a 100644
--- a/challenge-103/adam-russell/perl/ch-2.pl
+++ b/challenge-103/adam-russell/perl/ch-2.pl
@@ -50,7 +50,7 @@ sub now_playing{
my $hours = int($position/3600);
my $minutes = int(($position % 3600) / 60);
my $seconds = int(($position % 3600) % 60);
- $position = $hours . ":" . $minutes . ":" . $seconds;
+ $position = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes) . ":" . sprintf("%02d", $seconds);
return ($song, $position);
}
}