in reply to Challenge: sort weekdays in week-order (elegantly and efficiently)

Using Salva's Sort::Key is efficient and elegant, but I can't get rid of the order info
use v5.12; use warnings; use Sort::Key qw/ikeysort/; use Data::Dump qw/pp dd/; my $n; my %order = map {$_ => ++$n} qw/monday tuesday wednesday thursday friday saturday sunday/; pp ikeysort { $order{lc($_)} } qw/Monday Saturday Thursday/;

==>

("Monday", "Thursday", "Saturday")

edit
oops wait, there is a bug...

update

Fixed bug in %order creation

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery