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)

--

--beast


--
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