EchoAngel has asked for the wisdom of the Perl Monks concerning the following question:
i want to sort the list in the elements from the longest string length to the smallest length. is there any fast/smart way of doing it? I been converting this data into a hash and created a key based on length of the elements and sorting that ie $HASH{"6"}{"hohoho"} = 1;@elements = ("hohoho" , "work" , "gates" , "ragarnok" , ".");
20040904 Edit by castaway: Changed title from 'Sort Question'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sort by string length
by kesterkester (Hermit) on Sep 03, 2004 at 21:59 UTC | |
by EchoAngel (Pilgrim) on Sep 03, 2004 at 22:06 UTC | |
|
Re: Sort by string length
by Enlil (Parson) on Sep 03, 2004 at 21:59 UTC | |
|
Re: Sort by string length
by bobf (Monsignor) on Sep 03, 2004 at 22:03 UTC | |
|
Re: Sort by string length
by Anonymous Monk on Sep 03, 2004 at 23:38 UTC |