## RECAP - Perl Weekly Challenge - 052

Monday, Mar 23, 2020| Tags: Perl, Raku

Last week, we had guest contributor, Richard Park, who contributed APL solutions. Roger Bell_West shared blogs for Week 048 and Week 049. Athansius shared solutions to the last week challenge after a short break. Welcome back Athanasius.

I would like to share an interesting bit from Perl Reviews 050 by Ryan Thompson. In his review, Ryan improved my definition of the subroutine _order_intervals() as defined below:

``````sub _order_intervals {
my (\$intervals) = @_;
my @intervals = ();
foreach my \$i (@\$intervals) {
push @intervals, sprintf("%d-%d", \$i->[0], \$i->[1]);
}
# Borrowed with input from E. Choroba
# https://stackoverflow.com/questions/27089498/sorting-arrays-of-intervals-in-perl
my @_sorted = sort {
my (\$a1, \$a2) = \$a =~ /-?\d+/g;
my (\$b1, \$b2) = \$b =~ /-?\d+/g;
\$a1 <=> \$b1 || \$a2 <=> \$b2;
} @intervals;
my \$sorted = [];
foreach (@_sorted) {
my (\$a, \$b) = split /(?<=\d)-(?=\d)/, \$_, 2;
push @\$sorted, [ \$a+0, \$b+0 ];
}
return \$sorted;
}
``````

to something like this. I feel like dumb now.

``````sub _order_intervals {
[ sort { \$a->[0] <=> \$b->[0] || \$a->[1] <=> \$b->[1] } @{\$_[0]} ]
}
``````

# CENTURION CLUB

Changes to the ranking in the Centurion Club last week listed below

With last week contributions, I have now moved up to the rank #042. Lubos Kolouch joined the club last week. Many congratulations from the Team PWC.

# DAMIAN’s CORNER

Checkout the masterpiece collection of blogs by Damian Conway solving “Perl Weekly Challenge”.

# PERL SOLUTIONS

### Andrezgz

[PERL #1] [PERL #2]

### Athanasius

[PERL #1] [PERL #2]

### Cheok-Yin Fung

[PERL #1] [PERL #2] [BLOG #1]

### Cristina Heredia

[PERL #1] [PERL #2]

### Dave Cross

[PERL #1] [PERL #2]

### Dave Jacoby

[PERL #1] [PERL #2] [BLOG #1]

### Duncan C. White

[PERL #1] [PERL #2]

### E. Choroba

[PERL #1] [PERL #2] [BLOG #1]

### Lubos Kolouch

[PERL #1] [PERL #2]

### Saif Ahmed

[PERL #1] [PERL #2]

### User Person

[PERL #1] [PERL #2]

### Wanderdoc

[PERL #1] [PERL #2]

### Yet Ebreo

[PERL #1] [PERL #2]

# RAKU SOLUTIONS

### Arne Sommer

[RAKU #1] [RAKU #2] [BLOG #1]

### Kevin Colyer

[RAKU #1] [RAKU #2]

### Luca Ferrari

[RAKU #1] [RAKU #2] [BLOG #1] [BLOG #2]

### Mark Anderson

[RAKU #1] [RAKU #2]

### Noud Aldenhoven

[RAKU #1] [RAKU #2]

[RAKU #1]

# PERL & RAKU SOLUTIONS

### Alicia Bielsa

[PERL #1] [PERL #2] [RAKU #1]

### Colin Crain

[PERL #1] [PERL #2] [RAKU #1] [RAKU #2]

### Javier Luque

[PERL #1] [PERL #2] [RAKU #1] [RAKU #2] [BLOG #1]

### Laurent Rosenfeld

[PERL #1] [PERL #2] [RAKU #1] [RAKU #2] [BLOG #1]

### Markus Holzer

[PERL #1] [RAKU #1] [RAKU #2]

[PERL #1] [PERL #2] [RAKU #1] [RAKU #2] [BLOG #1]

### Roger Bell_West

[PERL #1] [PERL #2] [RAKU #1] [RAKU #2]

### Ruben Westerberg

[PERL #1] [PERL #2] [RAKU #1] [RAKU #2]

### Ryan Thompson

[PERL #1] [PERL #2] [RAKU #1] [RAKU #2] [BLOG #1] [BLOG #2]

Last but not the least, I would like to request all members, please send us your photo, that you already use on some other web platform, to use in the weekly blog, if not already sent.

## SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.