MCPM: Sorting
Stephen Walker
swalker at walkertek.com
Thu Aug 29 02:04:57 CDT 2002
try this:
@items = map { $_->[1] }
sort { $a->[0] cmp $b->[0] || $a->[1] cmp $b->[1] }
map { [length($_), $_] } @items;
I think it does what your asking.
Steve
--
Stephen Walker <http://www.walkertek.com>
---------- Original Message -----------
From: Andy Murren <andy at murren.org>
To: morriscounty at pm.org
Sent: Thu, 29 Aug 2002 15:02:23 -0400
Subject: MCPM: Sorting
> On my application I have questions numbered from 7a to 7ax. Is there
> a way to sort so it comes out a-z then aa-ax ? When I try to sort I
> get a,aa-az,b-z which is not what I want.
>
> Anyone got this figured out?
>
> Andy
>
> --
> Andy Murren
> andy at murren.org
------- End of Original Message -------
More information about the morriscounty-pm
mailing list