Sort a list of object identifiers
The sort
routine accepts a sort key callback as the first argument. Here we generate a list of integers as the sort key for each OID, which gets sorted lexicographically with numeric comparison by default.
Output:
Alternatively, using the sprintf
-based approach used by the Perl solution, for comparison (input elided):
Or if using a third-party module is acceptable:
Last updated