for my $i (@pointlist){
  $rankA = $ranklist[$i] if $pointA < $pointlist[$i];
  $rankB = $ranklist[$i] if $pointB < $pointlist[$i];
}

の方がすっきりしない?