After recommending the Schwartzian Transform to someone recently (and directing them to http://www.5sigma.com/perl/schwtr.html as a reference)
I meditated that someone has probably written a module to
encapsulate the Schwartzian Transform. I looked but couldn't see one.
I was thinking of something like:
$file_size_sort = new Sort::Schwartzian
left => '-s $a', op=>'<=>', right =>'-s $b';
... later ...
@sorted = $file_size_sort->(@files);
$sort_by_score = new Sort::Schwartzian
left => '$b->score', op=>'<=>', right =>'$a->score';
If such a thing doesn't exist I'm suggesting someone write one. Volunteers?