aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-002/ailbhe-tweedie/perl5/ch-01.pl12
1 files changed, 5 insertions, 7 deletions
diff --git a/challenge-002/ailbhe-tweedie/perl5/ch-01.pl b/challenge-002/ailbhe-tweedie/perl5/ch-01.pl
index 645d671986..e4a72a65e9 100755
--- a/challenge-002/ailbhe-tweedie/perl5/ch-01.pl
+++ b/challenge-002/ailbhe-tweedie/perl5/ch-01.pl
@@ -1,11 +1,9 @@
#!/usr/bin/env perl
#
# Solution to challenge #1 of the Perl Weekly Challenge 002.
-#
-# TODO: I would like to add some automated testing to this solution.
-$number = '001';
-
-$number =~ s/^0+//;
-
-print "$number\n";
+while (<>) {
+ chomp;
+ $_ =~ s/^0+//;
+ print "$_\n";
+}