use List::Util qw(max maxstr min minstr); my $highest = max @numlist; my $highstr = maxstr @strlist; my $lowest = min @numlist; my $lowstr = minstr @strlist;