my ($highest) = sort { $b <=> $a } $string =~ /([\d\.-]+)/g; print "$highest\n";