Re: [SPAM DETECT] Re: sort with special order

2005-10-03 Thread Xavier Noria
On Oct 3, 2005, at 18:16, Jeff 'japhy' Pinyan wrote: On Oct 3, JupiterHost.Net said: I have a list of strings that start with an uppercase B, Q, or Z I need to sort them so they are in order of Q, B , then Z Any ideas or input on how to efficiently do that with sort() or even map() is

Re: [SPAM DETECT] Re: sort with special order

2005-10-03 Thread Jeff 'japhy' Pinyan
On Oct 3, Xavier Noria said: On Oct 3, 2005, at 18:16, Jeff 'japhy' Pinyan wrote: my @sorted = map { tr/123/QBZ/; $_ } sort map { tr/QBZ/123/; $_ } @data; There's a potential gotcha there: since all Qs and Bs are being swapped lexicographic order after the first character