[ABE.pm] sorting an AoA

Faber J. Fedor faber at linuxnj.com
Wed Jul 26 13:06:32 PDT 2006


On 26/07/06 15:56 -0400, Walt Mankowski wrote:
> On Wed, Jul 26, 2006 at 03:24:59PM -0400, Faber J. Fedor wrote:
> > How do I get @array1 sorted into @array2?  
> 
> This seems to work:
> 
> my @array2 = sort {$a->[1] <=> $b->[1]} @array1;

You're right.  I obviously don't understand what's going on here (that's
a Schwartzian transform, right?) because I thought it was returning a
one-dimensional array.


-- 
 
Regards,
 
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701

http://www.linuxnj.com





More information about the ABE-pm mailing list