in reply to Re: The longest word ....
in thread The longest word ....

There could be more than one longest words having the same length, you probably want all of them:
use strict; my @words = ("one", "two", "123456789012345", "three", "four", "sumofa +llnumbers", "five", "six", "seven", "eight"); my @sorted_words = sort {length($b) <=> length($a)} @words;

my @longest_words = grep (/.{$#sorted_words}/, @words);
print join(",", @longest_words);