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

Zoogie has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm trying to write a sort function that sorts section numbers of a large document into the proper order. I keep having the feeling that's there's really easy way to do this in Perl that I'm missing :)

The section numbers look like "1, 2, 2.2, 2.13, 2.1.7, 3.4a, ...", etc. Neither a regular numeric sort nor a textual sort work, because "2.13" must come after "2.2", "10" must come after "2", and so forth.

I'm having a serious mental block on this one. Any ideas?