in reply to I fear my code is unreadable

The first step is to replace (sort {$b <=> $a } ...)[0] with
use List::Util qw(max); max(...)

If you want to remove the map from that line, introduce a temporary variable that holds the output of map.