○○ソートみたいなやつ

ソートファクトリー
こういうの。

use strict;
use warnings;
use Path::Class;

my @list  = file('list.txt')->slurp(chomp=>1);
my $COUNT = 0;
print "$_\n" foreach sort { compare($a, $b) } @list;

sub compare{
  my($lhs, $rhs) = @_;
  printf("#%02d: which do you like?\n", ++$COUNT);
  print "1. $lhs\n";
  print "2. $rhs\n";
  print "3. Even\n";
  my $input = <>; $input =~ tr/\x0A\x0D//d;
  if($input == 1){
    return -1;
  }
  elsif($input == 2){
    return 1;
  }
  elsif($input == 3){
    return 0;
  }
  else{
    die;
  }
}