Chas. Owens wrote:
On Wed, May 28, 2008 at 5:07 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
snip
$max = (sort {$a <=> $b} @z)[-1];
snip
my $max = (sort { $b <=> $a } @z)[0];
is slightly faster than using [-1].
Or:
my ( $max ) = sort { $b <=> $a } @z;
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/