in reply to The longest word ....
use strict; my @words = ("one", "two", "three", "four", "sumofallnumbers", "five", + "six", "seven", "eight"); my @sorted_words = sort {length($b) <=> length($a)} @words; print "the longest word is: $sorted_words[0]";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: The longest word ....
by pg (Canon) on Nov 12, 2002 at 04:30 UTC |