in reply to Splitting each word in a string

You can use split (/ +/,$string); The + meaning that you want to consider one or more spaces as separators.