aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Mochan <mochan@fis.unam.mx>2024-09-09 09:42:56 -0600
committerLuis Mochan <mochan@fis.unam.mx>2024-09-09 09:42:56 -0600
commit8ff839c95d136ef37053fa856fda9c0f7266901f (patch)
treef8191f05a985f856849688f3e34dbc78401a647c
parent46383cfc46b0e61ded02d631cf6bab8b7c2d1b73 (diff)
downloadperlweeklychallenge-club-8ff839c95d136ef37053fa856fda9c0f7266901f.tar.gz
perlweeklychallenge-club-8ff839c95d136ef37053fa856fda9c0f7266901f.tar.bz2
perlweeklychallenge-club-8ff839c95d136ef37053fa856fda9c0f7266901f.zip
Fix self-consistency
-rwxr-xr-xchallenge-286/wlmb/perl/ch-1.pl8
-rwxr-xr-xchallenge-286/wlmb/perl/ch-2.pl2
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;
}