diff options
| author | Adam Russell <ac.russell@live.com> | 2021-03-13 13:52:26 -0500 |
|---|---|---|
| committer | Adam Russell <ac.russell@live.com> | 2021-03-13 13:52:26 -0500 |
| commit | 0d2d9c79c0f1cc62f5513d6587a21803f360c216 (patch) | |
| tree | 80e88aae362d1ff814581c13a90286a268eb2cb3 | |
| parent | 4a927b0582cd2fbd46b8b899895122e76dfa8ec4 (diff) | |
| download | perlweeklychallenge-club-0d2d9c79c0f1cc62f5513d6587a21803f360c216.tar.gz perlweeklychallenge-club-0d2d9c79c0f1cc62f5513d6587a21803f360c216.tar.bz2 perlweeklychallenge-club-0d2d9c79c0f1cc62f5513d6587a21803f360c216.zip | |
blog link and updated position formatting
| -rw-r--r-- | challenge-103/adam-russell/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-103/adam-russell/perl/ch-2.pl | 2 |
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); } } |
