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;
In the sort() block, $a and $b are two elements of the list being
compared. Since the elements are array references, and their first
element is their UID, I've used $a->[0] <=> $b->[0] to compare those two
values. See the documentation for 'sort' (perldoc -f sort) for more
details.
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
http://japhy.perlmonk.org/ % have long ago been overpaid?
http://www.perlmonks.org/ % -- Meister Eckhart