diff options
| -rw-r--r-- | challenge-050/e-choroba/blog.txt | 1 | ||||
| -rwxr-xr-x | challenge-050/e-choroba/perl/ch-1.pl | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/challenge-050/e-choroba/blog.txt b/challenge-050/e-choroba/blog.txt new file mode 100644 index 0000000000..05ab3fbdf2 --- /dev/null +++ b/challenge-050/e-choroba/blog.txt @@ -0,0 +1 @@ +http://blogs.perl.org/users/e_choroba/2020/03/perl-weekly-challenge-050-merge-intervals-and-noble-integer.html diff --git a/challenge-050/e-choroba/perl/ch-1.pl b/challenge-050/e-choroba/perl/ch-1.pl index 436d44f96c..baf1934c4e 100755 --- a/challenge-050/e-choroba/perl/ch-1.pl +++ b/challenge-050/e-choroba/perl/ch-1.pl @@ -19,7 +19,7 @@ use strict; sub out { my ($self) = @_; my @r; - for my $k (sort { $a <=> $b } grep 'same' ne $_, keys %$self) { + for my $k (sort { $a <=> $b } keys %$self) { if (($self->{$k} & (LEFT | RIGHT)) == LEFT) { push @r, [$k]; } elsif (($self->{$k} & (LEFT | RIGHT)) == RIGHT) { |
