use strict; use warnings; use feature qw( say ); use List::Util qw( reduce ); my %students = ( ... ); my $highest = reduce { $students{$a} >= $students{$b} ? $a : $b } keys(%students); say $students{$highest};