http://www.perlmonks.org?node_id=519333


in reply to Sorting The Date format Values without using any perl modules.

If your dates are precisely in that format, i.e. YYYY-MM-DD, then a plain (string-wise) sort should just do:
$ perl -le 'print for sort qw/2005-12-01 2005-11-02 2005-12-07/' 2005-11-02 2005-12-01 2005-12-07