diff options
| author | Adam Russell <ac.russell@live.com> | 2019-08-25 11:42:12 -0400 |
|---|---|---|
| committer | Adam Russell <ac.russell@live.com> | 2019-08-25 11:42:12 -0400 |
| commit | dc78282f25f7f153fff201b5d72ee6fe8976b676 (patch) | |
| tree | 43945ba15e9ca9fdb9fce20f490040a723d0fa09 | |
| parent | 181c9ec85fd17364fa26cd47f27a5736b6380fb1 (diff) | |
| parent | 4f1bef027332b9127d4e913caf41df53772bc8c8 (diff) | |
| download | perlweeklychallenge-club-dc78282f25f7f153fff201b5d72ee6fe8976b676.tar.gz perlweeklychallenge-club-dc78282f25f7f153fff201b5d72ee6fe8976b676.tar.bz2 perlweeklychallenge-club-dc78282f25f7f153fff201b5d72ee6fe8976b676.zip | |
Merge remote-tracking branch 'upstream/master'
107 files changed, 7585 insertions, 5187 deletions
@@ -12,7 +12,7 @@ In case you have created a blog about your solutions, then create a file called ## Step-by-step instructions Let us assume you want to subtmit solutions for **Challenge 002** and your Github user name is **joe-blog**. -1. If you are submitting the solution for the first time then you have to **Fork** the repository by clicking the "Fork" button in the top right corner and should have repository e.g. **https://github.com/joe-blog/perlweeklychallenge-club**. +1. If you are submitting the solution for the first time then you have to **Fork** the repository **https://github.com/manwar/perlweeklychallenge-club** by clicking the "Fork" button in the top right corner and should have repository e.g. **https://github.com/joe-blog/perlweeklychallenge-club**. 2. Go to your favourite terminal and **clone** your repository. e.g **git clone https://github.com/joe-blog/perlweeklychallenge-club**. diff --git a/challenge-001/yet-ebreo/README b/challenge-001/yet-ebreo/README new file mode 100644 index 0000000000..c44a8ce2be --- /dev/null +++ b/challenge-001/yet-ebreo/README @@ -0,0 +1 @@ +Solution by Yet Ebreo diff --git a/challenge-001/yet-ebreo/perl5/ch-1.pl b/challenge-001/yet-ebreo/perl5/ch-1.pl new file mode 100644 index 0000000000..81e65b7b40 --- /dev/null +++ b/challenge-001/yet-ebreo/perl5/ch-1.pl @@ -0,0 +1,12 @@ +#Write a script to replace the character ‘e’ with ‘E’ in the string ‘Perl Weekly +#Challenge’. Also print the number of times the character ‘e’ is found in the string. +use 5.010; +sub get_e { + return $_[0]=~y/e/E/; +} + +my $string = "Perl Weekly Challenge"; +my $count = get_e( $string ); + +say "Resulting string: $string"; +say "Replaced e: $count times";
\ No newline at end of file diff --git a/challenge-001/yet-ebreo/perl5/ch-2.sh b/challenge-001/yet-ebreo/perl5/ch-2.sh new file mode 100644 index 0000000000..5c2ccf9392 --- /dev/null +++ b/challenge-001/yet-ebreo/perl5/ch-2.sh @@ -0,0 +1,6 @@ +# Write a one-liner to solve the FizzBuzz problem and print the numbers 1 through 20. +# However, any number divisible by 3 should be replaced by the word ‘fizz’ and +# any divisible by 5 by the word ‘buzz’. Those numbers that are both divisible +# by 3 and 5 become ‘fizzbuzz’. + +perl -E 'say $_ % 15?$_ % 5?$_ % 3?$_:fizz:buzz:fizzbuzz for 1..20'
\ No newline at end of file diff --git a/challenge-001/yet-ebreo/perl6/ch-1.p6 b/challenge-001/yet-ebreo/perl6/ch-1.p6 new file mode 100644 index 0000000000..22188f9938 --- /dev/null +++ b/challenge-001/yet-ebreo/perl6/ch-1.p6 @@ -0,0 +1,10 @@ +#Write a script to replace the character ‘e’ with ‘E’ in the string ‘Perl Weekly +#Challenge’. Also print the number of times the character ‘e’ is found in the string. + +my $string = "Perl Weekly Challenge"; +my @count = $string~~m:g/e/ ; +$string~~tr/e/E/; + + +say "Resulting string: $string"; +say "Replaced e: "~0+@count~" times";
\ No newline at end of file diff --git a/challenge-001/yet-ebreo/perl6/ch-2.p6 b/challenge-001/yet-ebreo/perl6/ch-2.p6 new file mode 100644 index 0000000000..cc4a38c370 --- /dev/null +++ b/challenge-001/yet-ebreo/perl6/ch-2.p6 @@ -0,0 +1,6 @@ +# Write a one-liner to solve the FizzBuzz problem and print the numbers 1 through 20. +# However, any number divisible by 3 should be replaced by the word ‘fizz’ and +# any divisible by 5 by the word ‘buzz’. Those numbers that are both divisible +# by 3 and 5 become ‘fizzbuzz’. + +say $_ % 15??$_ % 5??$_ % 3??$_!!'fizz'!!'buzz'!!'fizzbuzz' for 1..20
\ No newline at end of file diff --git a/challenge-007/kian-meng-ang/blog1.txt b/challenge-007/kian-meng-ang/blog1.txt new file mode 100644 index 0000000000..8818fc8e5b --- /dev/null +++ b/challenge-007/kian-meng-ang/blog1.txt @@ -0,0 +1 @@ +https://perlweeklychallenge.org/blog/review-challenge-007.md diff --git a/challenge-008/kian-meng-ang/blog1.txt b/challenge-008/kian-meng-ang/blog1.txt new file mode 100644 index 0000000000..5946b35703 --- /dev/null +++ b/challenge-008/kian-meng-ang/blog1.txt @@ -0,0 +1 @@ +https://perlweeklychallenge.org/blog/review-challenge-008.md diff --git a/challenge-009/kian-meng-ang/blog1.txt b/challenge-009/kian-meng-ang/blog1.txt new file mode 100644 index 0000000000..a7f607169c --- /dev/null +++ b/challenge-009/kian-meng-ang/blog1.txt @@ -0,0 +1 @@ +https://perlweeklychallenge.org/blog/review-challenge-009.md diff --git a/challenge-010/kian-meng-ang/blog1.txt b/challenge-010/kian-meng-ang/blog1.txt new file mode 100644 index 0000000000..c33054034f --- /dev/null +++ b/challenge-010/kian-meng-ang/blog1.txt @@ -0,0 +1 @@ +https://perlweeklychallenge.org/blog/review-challenge-010.md diff --git a/challenge-011/kian-meng-ang/blog1.txt b/challenge-011/kian-meng-ang/blog1.txt new file mode 100644 index 0000000000..2f25a211a4 --- /dev/null +++ b/challenge-011/kian-meng-ang/blog1.txt @@ -0,0 +1 @@ +https://perlweeklychallenge.org/blog/review-challenge-011.md diff --git a/challenge-012/kian-meng-ang/blog.txt b/challenge-012/kian-meng-ang/blog.txt new file mode 100644 index 0000000000..4fc81ca138 --- /dev/null +++ b/challenge-012/kian-meng-ang/blog.txt @@ -0,0 +1 @@ +https://perlweeklychallenge.org/blog/review-challenge-012.md diff --git a/challenge-013/kian-meng-ang/blog.txt b/challenge-013/kian-meng-ang/blog.txt new file mode 100644 index 0000000000..b15524eebf --- /dev/null +++ b/challenge-013/kian-meng-ang/blog.txt @@ -0,0 +1 @@ +https://perlweeklychallenge.org/blog/review-challenge-013.md diff --git a/challenge-014/kian-meng-ang/blog.txt b/challenge-014/kian-meng-ang/blog.txt new file mode 100644 index 0000000000..4d8994b028 --- /dev/null +++ b/challenge-014/kian-meng-ang/blog.txt |
