bravo choroba!
I was trying something similar but I easily get annoyed by strptime et similia...
Infact even with your code I hit Error parsing time at C:/perl5.26.64bit/perl/lib/Time/Piece.pm line 581.
I'd modify your code to be even more stable, in the case they accept my proposal for 8 days week, adding Lokiday as jolly day free for all :D
my %order = map {
split ' ', 'Time::Piece'->strptime("$_", "%d")->strftime('%A %u')
} Time::Piece::day_list();
bliako: your solution is already elegant, readable and perlish: dont overcomplicate :)
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
|