This is part II of Kixtart Golf (for the slow days on the BBS).

For rules, please see this post: http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=2;t=003357

Here's the new task:
Given is a list of computernames and IP addresses of a Windows NT 4.0 domain (Class C network). The list is stored in the temporary directory as file COMPUTERS.INI. Sort the list by the length of the computernames in ascending order. If multiple computernames have the same length then sort those additionally by ascending IP addresses. Return an array containing the sorted computernames.

Below is a sample COMPUTERS.INI posted:
code:
[Comp1]
IP=111.222.333.25

[Comp2]
IP=111.222.333.42

[Computer1]
IP=111.222.333.53

[Computer2]
IP=111.222.333.27

[ServerA]
IP=111.222.333.132

[WorkstationB]
IP=111.222.333.68

The correct output array would contain the computernames in the following order:
code:
Comp1
Comp2
ServerA
Computer2
Computer1
WorkstationB

My solution contains 448 characters in 29 lines and does not use any UDF. NOTE: There is no penalty for obscurity or time. UDFs are allowed and will be counted, too. The carriage return character and the space character used to separate commands/functions do not count as strokes.

Good luck everybody!
_________________________
There are two types of vessels, submarines and targets.