On one occasion the Blessed One was living at Savatthi in Jeta's Grove, Anathapindika's Park. Then the wanderer Vekhanassa went to the Blessed One and exchanged greetings with him. When this courteous and amiable talk was finished, he stood at one side and in the Blessed One's presence he uttered this exclamation: "This is the perfect splendor, this is the perfect splendor!" Buddha: "But, Kaccana, why do you say: 'This is the perfect splendour, this is the perfect splendour!'? What is that perfect splendour?" Kaccana: "Master Gotama, that splendor is the perfect splendor which is unsurpassed by any other splendor higher or more sublime." Buddha : "What is that splendour that is unsurpassed by any other splendour higher or more sublime?" Kaccana: "Master Gotama, that splendor is the perfect splendor that is unsurpassed by any other splendor higher or more sublime."
Buddha: "Kaccana, you might continue for a long time in this way...(as Sutta 79)...yet you do not indicate what that splendor is. Kaccana, there are these five cords of sensual pleasure. What five? Forms cognizable by the eye that are wished for, desired, agreeable, and like-able, connected with sensual desire and provocative of lust. Sounds cognizable by the ear...Odors cognizable by the nose...Flavors cognizable by the tongue... Tangibles cognizable by the body that are wished for, desired, agreeable, and like-able, connected with sensual desire and provocative of lust. These are the five cords of sensual pleasure."
"Now, Kaccana, the pleasure and joy that arise dependent on these five cords of sensual pleasure are called sensual pleasure. Thus sensual pleasure arises through sensual pleasures, but beyond sensual pleasure there is a pleasure higher than the sensual, and that is declared to be the highest among them."
When this was said, the wanderer Vekhanassa said: "It is wonderful, Master Gotama, it is marvellous, how well that has been expressed by Master Gotama: "Thus sensual pleasure arises through sensual pleasures, but beyond sensual pleasure there is a pleasure higher than the sensual, and that is declared to be the highest among them.'"
Buddha: "Kaccana, for you who are of another view, who accept another teaching, who approve of another teaching, who pursue a different training, who follow a different teacher, it is hard to know what sensuality is, or what sensual pleasure is, or what the pleasure higher than the sensual is. But those bhikkhus who are arahants with taints destroyed, who have lived the holy life, done what had to be done, laid down the burden, reached the true goal, destroyed the fetters of being, and are completely liberated through final knowledge - it is they who would know what sensuality is, what sensual pleasure is, and what the pleasure higher than the sensual is."
When this was said, the wanderer Vekhanassa was angry and displeased, and he reviled, disparaged, and censured the Blessed One, saying: "The recluse Gotama will be worsted." He then said to the Blessed One: "So then there are some recluses and brahmins here who, without knowing the past and without seeing the future, yet claim: 'Birth is destroyed, the holy life has been lived, what had to be done has been done, there is no more coming to any state of being.' What they say turns out to be ridiculous; it turns out to be mere words, empty and hollow."
"If any recluses and brahmins, without knowing the past and without seeing the future, yet claim: 'Birth is destroyed, the holy life has been lived, what had to be done has been done, there is no more coming to any state of being,' they can be confuted in accordance with the Dhamma. Rather, let the past be, Kaccana, and let the future be. Let a wise man come, one who is honest and sincere, a man of rectitude. I instruct him, I teach him the Dhamma in such a way that by practicing as instructed he will soon know and see for himself: "Thus, indeed, there rightly comes to be liberation from the bond, that is, from the bond of ignorance.' Suppose, Kaccana, there were a young tender infant lying prone, bound by stout bonds at the four limbs with the fifth at the neck; and later on, as a result of his growth and the maturing of his faculties, those bonds loosened, then he would know 'I am free' and there would be no more bondage. So too, let a wise man come...'Thus, indeed, there rightly comes to be liberation from the bond, that is, from the bond of ignorance.'"
When this was said, the wanderer Vekhanassa said to the Blessed One: "Magnificent, Master Gotama! Magnificent, Master Gotama! Master Gotama has made the Dhamma clear...(as Sutta 79,)...for those with eyesight to see forms. I go to Master Gotama for refuge and to the Dhamma and to the Sangha of bhikkhus. From today let the Blessed One remember me as a lay follower who has gone to him for refuge for life."
In summary, a wanderer Vekhanassa visits the Buddha at Jetavana and argues about perfection. As per Majjhima Nikaya 79, the Buddha says that what Vekhanassa defines as perfection is merely a refinement of pleasure and that only arahants can grasp the real meaning of perfection. Vekhanassa is annoyed by this statement and argued with the Buddha. The Buddha then explained the dangers of sensual pleasures and the consequences of being attached to them and the liberation through destruction of taints and bondage to ignorance. In the end, Vekhanassa was convinced by Buddha's teaching and noted on his wrong view earlier, he later became the Buddha's follower.
References: 1. www.accesstoinsight.org 2. https://suttacentral.net/ 3. The middle length discourses of the Buddha (Bhikkhu Bodhi)