diff options
| author | deadmarshal <adeadmarshal@gmail.com> | 2021-01-30 10:39:14 +0330 |
|---|---|---|
| committer | deadmarshal <adeadmarshal@gmail.com> | 2021-01-30 10:39:14 +0330 |
| commit | 7367f832f1b4743aaebe9e01a0082365eb413630 (patch) | |
| tree | 5ca0beb43f35ce3402d0790ae2e26cc3cf77e61c /challenge-001 | |
| parent | 6081cb3b01443dba85d8120552351611f04a5e87 (diff) | |
| download | perlweeklychallenge-club-7367f832f1b4743aaebe9e01a0082365eb413630.tar.gz perlweeklychallenge-club-7367f832f1b4743aaebe9e01a0082365eb413630.tar.bz2 perlweeklychallenge-club-7367f832f1b4743aaebe9e01a0082365eb413630.zip | |
Added challenge 1 solutions.
Diffstat (limited to 'challenge-001')
| -rw-r--r-- | challenge-001/deadmarshal/perl/README | 1 | ||||
| -rw-r--r-- | challenge-001/deadmarshal/perl/ch-1.pl | 12 | ||||
| -rwxr-xr-x | challenge-001/deadmarshal/perl/ch-2.sh | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/challenge-001/deadmarshal/perl/README b/challenge-001/deadmarshal/perl/README new file mode 100644 index 0000000000..bd0573c85f --- /dev/null +++ b/challenge-001/deadmarshal/perl/README @@ -0,0 +1 @@ +Solution by Ali Moradi diff --git a/challenge-001/deadmarshal/perl/ch-1.pl b/challenge-001/deadmarshal/perl/ch-1.pl new file mode 100644 index 0000000000..4e13444899 --- /dev/null +++ b/challenge-001/deadmarshal/perl/ch-1.pl @@ -0,0 +1,12 @@ +#!/usr/local/bin/perl +use strict; +use warnings; +use feature 'say'; + + +my $string = "Perl weekly challenge"; + +my $count = $string =~ s/e/E/g; + +print $string, "\n"; +print $count, "\n"; diff --git a/challenge-001/deadmarshal/perl/ch-2.sh b/challenge-001/deadmarshal/perl/ch-2.sh new file mode 100755 index 0000000000..4c164fdac1 --- /dev/null +++ b/challenge-001/deadmarshal/perl/ch-2.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +perl -E 'foreach (1..20){if($_ % 3 == 0 && $_ % 5 == 0){say "$_ : fizzbuzz"}elsif($_ % 5 == 0){say "$_ : buzz"}elsif($_ % 3 == 0){say "$_ : fizz"}}' |
