yes I was thinking that way too, but I'm trying to avoid that solution, because in my script it's not very easy to join those two arrays ( there are variable count of spaces between them during printing, the arrays are filled in different time etc.). That sorting i'm trying to do is the last thing in my script (I will only print it afterwards), so I don't have to worry about maintaining parallel data structures