Im trying to sort a file based on line length:
my name is tim
I like pineapples alot
hi
into something like this
hi
my name is tim
i like pineapples alot
I have to include whitespaces in there too, so what i have tried doing is putting each line into an array as one line = 1 string in the array. Then I tried to sort the array but that didnt work out too well.