sub longest_words { my %W; push (@{$W{length($_)}}, $_) for (split /\s+/, join ' ', @_); return @{$W{ (sort{$b <=>$a} keys %W)[0]} }; }