in reply to Help me understand this code?

#!/usr/bin/perl; use warnings; use strict; # I am not sure what data set you have? # yyyy-mm-dd will sort in ASCII order # with a simple sort. # yyyy-dd-mm or mm-dd-yyyy is a bit more # complex, eg: 2013-11-07 vs 11-07-2013. # It is possible to detect yyyy-mm-dd # versus yyyy-dd-mm or mm-dd-yyyy, however # dd vs mm can be quite problematic. # 02-03-2011 vs 03-02-2011? # the code that you show is actually rather # strange looking. what are your trying to do? show some input and expected output.

Replies are listed 'Best First'.
Re^2: Help me understand this code?
by ansabhailte (Novice) on May 22, 2015 at 16:17 UTC
    Yeah, that confused me too.

    It's a user-submitted solution to /r/dailyprogrammer.

    The input is:
    https://gist.github.com/coderd00d/a88d4d2da014203898af

    The output would be the same list in a standard format.