how do I punctuate this sentence ?

What did the philosopher Aristotle mean when he said "To perceive is to suffer"?
or is this correct?

You need a comma after said, and the question mark goes inside the quotation marks suffer?"