in reply to how does these map statements work

Another good article on Perlish sorting: A Fresh Look at Efficient Perl Sorting.