Complex sentence: He served in the Second World War as Commander of the 9th (Highland) Division before retiring from the regular army in 1940, continuing his war service with the Perthshire Home Guard until the end of the War.
Split into simpler sentences: He served in World War II as Commander of 9th (Highland) Division before retiring in 1940. He continued has war service with the Perthshire Home Guard until the end of the War.