I have an array (@sentences) containing sentences, for example
I am searching for a word
What are you searching for?
Today I have been searching for a new job
I would like to sort them alphabetically according to the word on the left side of the word @query="searching". The sorted order would be:
I am searching for a word
Today I have been searching for a new job
What are you searching for?
Any ideas how to get started? I am really stuck... I guess, I should use split (\s), maybe map or index, and of course cmp. But I have really no idea how to start...So, any idea would be appreciated