in reply to how does these map statements work

Have you read perlintro?

split, map, sort, $a?

I see the node you're talking about is Sorting a text file, it links further reading material ... like

Read these too

Split columns according header delimiter,

http://learn.perl.org/faq/perlfaq4.html#How-do-I-sort-an-array-by-anything-, http://perldoc.perl.org/perlfaq4.html#How-do-I-sort-an-array-by-%28anything%29%3f

Understanding the Schwartzian transform.