diff options
| author | CY Fung <fungcheokyin@gmail.com> | 2022-09-03 10:11:26 +0800 |
|---|---|---|
| committer | CY Fung <fungcheokyin@gmail.com> | 2022-09-03 10:11:26 +0800 |
| commit | 54fb7864a82497043094da5d6f72ecf830da8db8 (patch) | |
| tree | 8927b2c49d16afdcc69ac72a75c98aabf1f0b96a | |
| parent | c5d821dde8d8a8be20f911fa8e6201d80074e1ad (diff) | |
| download | perlweeklychallenge-club-54fb7864a82497043094da5d6f72ecf830da8db8.tar.gz perlweeklychallenge-club-54fb7864a82497043094da5d6f72ecf830da8db8.tar.bz2 perlweeklychallenge-club-54fb7864a82497043094da5d6f72ecf830da8db8.zip | |
Week 180
| -rw-r--r-- | challenge-180/cheok-yin-fung/perl/ch-2.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-180/cheok-yin-fung/perl/ch-2.pl b/challenge-180/cheok-yin-fung/perl/ch-2.pl new file mode 100644 index 0000000000..f917a67771 --- /dev/null +++ b/challenge-180/cheok-yin-fung/perl/ch-2.pl @@ -0,0 +1,8 @@ +@a = split /\D/, $_; say join " ", grep { $_ > $a[0]} @a #perl -nE + + +# perl -nE '@a = split /\D/, $_; say join " ", grep { $_ > $a[0]} @a' +# [input] 3 1 4 2 3 5 +# [output] 4 5 +# [input] 4 9 0 6 2 3 8 5 +# [output] 9 6 8 5 |
