MNibble wrote:
> Beast wrote:
> 
>> Jeff 'japhy' Pinyan wrote:
>>
>>>>
>>>> Is there any builtin function in perl to sort the above array based
>>>> on uid, username or fulname?
>>>
>>>
>>>
>>>
>>> There is a built-in function to sort a list, yes.  But the mechanism
>>> by which to sort the list is, in this case, up to you to provide. 
>>> This works:
>>>
>>>   my @sorted = sort {
>>>     $a->[0] <=> $b->[0]
>>>   } @employees;
>>>
>>
>> Thank you.
>> However, is this scalable if, for example list is more than 5000 ?
>> (ie. obtain data from ldap which we can not ask data provider to sort
>> the entry for us)
>>
> if speed (scale) is a problem ... ask someone how

s/how/who/

 has the book effective
> perl 

That's Effective Perl Programming...

- there is a the "schwarz" sort code,

Schwartzian transform (http://en.wikipedia.org/wiki/Schwartzian_Transform)

 which usage caching for speed

s/usage/uses/

> up. ( Randel Schwarz is also on that list

That's Randal Schwartz... s/that/this/
(http://www.stonehenge.com/merlyn/)

 .. so maybe ... he can pass it
> anyway ).
> with regrads
> MNibble
> 

Some attention to detail in postings will reflect more highly on yourself.

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to