[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Finding the length of the longest string



On 990623, Larry Rosler wrote:
> Subtler and somewhat faster:
> 
> my $len = "";
> $len ^= $_ for @data;
> $len = length $len;

$len = shift @{[sort {$b<=>$a} map {length($_)} @data]};

okay, not faster.  but certainly less obvious.


==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org