I don't have very many "favourite poems", more now that I'm writing poetry, but this has been my favourite for many years.
Stanislaw Lem's book, "The Cyberiad: Tales from the Cybernetic Age" is a series of short stories about Trurl and Klapaucius, two robot inventors and good friends who quite often play practical jokes on each other and test out each other's inventions.
Trurl creates an Electronic Bard which can compose poetry and music and wants to show it off. Klapaucius is more than happy to help and his first request of the bard looks like this:
"Have it compose a poem about a haircut! But lofty, nobel, tragic, timeless, full of love, treachery, retribution, quiet heroism in the face of certain doom! Six lines, cleverly rhymed, and every word beginning with the letter "s"!"
Trurl is about to protest, believing that it's an unreasonable request, but before he says much at all, the Electronic Bard comes out with this gem:
Seduced, shaggy Samson snored.
She scissored short. Sorely shorn,
Soon shackled slave, Samson sighed,
Some savage, spectacular suicide.