sub longest_words { my @W = sort { length($b) <=> length($a) } $_[0] =~ /\b(\w+)\b/g; grep length == length($W[0]), @W; }