Irony is a rhetorical device in which an event that appears to be something in the surface is in fact completely different to the reality. In this case, the poem suggests that Richard Cory is the perfect man. He was a clean, slim gentleman. He was also rich and educated, and everyone wanted to be him. The reader, therefore, imagines that Cory has the perfect life. However, the irony at the end is that Cory ends up killing himself, proving that he did not have the perfect life everyone thought he had.