diff options
| -rw-r--r-- | challenge-153/james-smith/perl/ch-1.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/challenge-153/james-smith/perl/ch-1.pl b/challenge-153/james-smith/perl/ch-1.pl index 5f6777bb9b..8a8c83f012 100644 --- a/challenge-153/james-smith/perl/ch-1.pl +++ b/challenge-153/james-smith/perl/ch-1.pl @@ -4,5 +4,10 @@ use strict; use warnings; use feature qw(say); +## Normal print say my $t = my $f = 1; say $t += ($f*=$_) for 1..20; + +## Pretty print!! Single lining commify.... +printf "%26s\n", $t = $f = 1; +printf "%26s\n", scalar reverse ( reverse ($t += ($f*=$_)) =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/gr ) for 1..20; |
