print sort { (split ":", $a)[0] <=> (split ":", $b)[0] } @table; #### 111:A:B;C 2:D:E:F