diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2024-09-09 16:48:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-09 16:48:42 +0100 |
| commit | 148ad068f27ef5bbdcac38b14685b2273b0d02ec (patch) | |
| tree | 9e3d5ba3af4949e0d6bc67baacc469a1f573b119 | |
| parent | 4556180246e9b81018a148f4f7e28dea08c77964 (diff) | |
| parent | 8ff839c95d136ef37053fa856fda9c0f7266901f (diff) | |
| download | perlweeklychallenge-club-148ad068f27ef5bbdcac38b14685b2273b0d02ec.tar.gz perlweeklychallenge-club-148ad068f27ef5bbdcac38b14685b2273b0d02ec.tar.bz2 perlweeklychallenge-club-148ad068f27ef5bbdcac38b14685b2273b0d02ec.zip | |
Merge pull request #10807 from wlmb/challenges
Fix self-consistency
| -rwxr-xr-x | challenge-286/wlmb/perl/ch-1.pl | 8 | ||||
| -rwxr-xr-x | challenge-286/wlmb/perl/ch-2.pl | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/challenge-286/wlmb/perl/ch-1.pl b/challenge-286/wlmb/perl/ch-1.pl index 7ae442676f..b35d764968 100755 --- a/challenge-286/wlmb/perl/ch-1.pl +++ b/challenge-286/wlmb/perl/ch-1.pl @@ -3,6 +3,10 @@ # Task 1: Self Spammer # # See https://wlmb.github.io/2024/09/08/PWC286/#task-1-self-spammer -use v5.36; -my @words = qw( @words = qw( ) say $words [ rand( 0+@words ) ] ; ); +use v5.36 ; +no warnings qw( qw ) ; +my @words = qw( #!/usr/bin/env perl # Perl weekly challenge 286 Task 1: Self Spammer See + https://wlmb.github.io/2024/09/08/PWC286/#task-1-self-spammer + use v5.36 no warnings qw + my @words = qw( ) say $words [ rand( 0+@words ) ] ; ) ; say $words [ rand( 0+@words ) ] ; diff --git a/challenge-286/wlmb/perl/ch-2.pl b/challenge-286/wlmb/perl/ch-2.pl index 08163d0a8a..28072c2d21 100755 --- a/challenge-286/wlmb/perl/ch-2.pl +++ b/challenge-286/wlmb/perl/ch-2.pl @@ -15,7 +15,7 @@ my @next=@ARGV; while(@next>2){ my @minmax; for my($p,$q,$r,$s)(@next){ - push @minmax, min($p,$q),max($r,$s); + push @minmax, min($p,$q),max($r,$s); } @next=@minmax; } |
