I fully agree with everyone about how suffering is necessary to make us better people. (And perhaps even to produce great art, since Delta mentioned the great In Memoriam. If I had the book here I'd start quoting. )
However, on this subject my mind goes in circles. I accept the simple facts that our world is imperfect, that humans are imperfect, and that the seemingly terrible things can develop and refine character for the better. But a 'perfect' world (whatever that means) would become imperfect rapidly if the people had not learned those lessons of self-control, etc. that come through suffering. The way we're talking about a 'perfect world' we're taking it for granted that while everything may be going perfectly in the world, there is still something undesirable that needs to be refined out of human character or nature. But you simply can't have a perfect world while that something is active in us. I think a perfect world would have to be dependent upon perfect people. If, and how, that's possible is another story. And then the idea of what's 'perfect' is so subjective.
We all agree that pain can do us good, but our world can't become perfect through that merely. There will always be those who won't choose to profit from their pain and will become bitter and cause more pain and evil.
What I'm saying is that the problem is not with 'perfection' but what perfection is and how it is achieved.
Oh, yet we trust that somehow good
Will be the final end of ill,
To pangs of nature, sins of will,
Defects of doubt, and taints of blood...
Behold, we know not anything;
I can but trust that good shall fall
At last--far off--at last, to all,
And every winter change to spring.