thekestrel has asked for the wisdom of the Perl Monks concerning the following question:
What I want to ask advice for is what is the fastest/most efficient way to do this? Is there some neat equivalent of sort that equates to unsort. I was thinking of having either a hash or array and picking a value from the list then removing that selection and repeating until the list was empty each iteration, but that seems a little unwheeldly. I don't want any of the values repeated from the list i.e. dog dog cat pig, so just doing a rand on the size of my list is not what I'm after to select the elements.cat dog pig cow cow cat pig dog dog cow cat pig ... ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: unsorted list
by sgifford (Prior) on Apr 24, 2005 at 07:18 UTC | |
Re: unsorted list
by eibwen (Friar) on Apr 24, 2005 at 07:29 UTC | |
by thekestrel (Friar) on Apr 25, 2005 at 01:45 UTC | |
Re: unsorted list
by rg0now (Chaplain) on Apr 24, 2005 at 10:23 UTC | |
by thekestrel (Friar) on Apr 24, 2005 at 17:03 UTC | |
Re: unsorted list
by dbwiz (Curate) on Apr 24, 2005 at 07:04 UTC | |
by merlyn (Sage) on Apr 24, 2005 at 13:32 UTC | |
by Roy Johnson (Monsignor) on Apr 24, 2005 at 12:55 UTC | |
Re: unsorted list
by holli (Abbot) on Apr 24, 2005 at 06:26 UTC | |
Re: unsorted list
by TedPride (Priest) on Apr 24, 2005 at 07:39 UTC | |
by eibwen (Friar) on Apr 24, 2005 at 08:35 UTC | |
Re: unsorted list
by cog (Parson) on Apr 24, 2005 at 12:48 UTC | |
Re: unsorted list
by kwaping (Priest) on Apr 25, 2005 at 21:59 UTC |