diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2020-03-16 16:29:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-16 16:29:14 +0000 |
| commit | d4cffc1eccdfb261a9d1bc634d76392f50d6dce8 (patch) | |
| tree | 964f48f660f0ef6c6a26c2d9bbeb3ce10e98d731 | |
| parent | 6f9de1ef7b77ab7ff467120805a1d2ee4396a512 (diff) | |
| parent | 5ef00688c9308d24092e3124a57caef28016e8c7 (diff) | |
| download | perlweeklychallenge-club-d4cffc1eccdfb261a9d1bc634d76392f50d6dce8.tar.gz perlweeklychallenge-club-d4cffc1eccdfb261a9d1bc634d76392f50d6dce8.tar.bz2 perlweeklychallenge-club-d4cffc1eccdfb261a9d1bc634d76392f50d6dce8.zip | |
Merge pull request #1416 from Doomtrain14/master
Added perl 5 solution ch#52-1
| -rw-r--r-- | challenge-052/yet-ebreo/perl/ch-1.pl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/challenge-052/yet-ebreo/perl/ch-1.pl b/challenge-052/yet-ebreo/perl/ch-1.pl new file mode 100644 index 0000000000..1f3064e74a --- /dev/null +++ b/challenge-052/yet-ebreo/perl/ch-1.pl @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use feature 'say'; + +my ($start,$end) = @ARGV; + +die ("Usage:\n\tch1.pl <start> <end>\n\n") if @ARGV<2; + +my @range = ($start..$end); +my $step = "123456789"; +say "List of stepping number(s) from $start to $end"; +"@range " =~ "$& " && say $& while $step =~ s/.(..)/$1/; +=begin +perl .\ch-1.pl 124 780 +List of stepping number(s) from 124 to 780 +234 +345 +456 +567 +678 + +perl .\ch-1.pl 100 999 +List of stepping number(s) from 100 to 999 +123 +234 +345 +456 +567 +678 +789 +=cut
\ No newline at end of file |
