One verse

Srimad Bhagavatam 9.6.51

9.6.51

सङ्गं त्यजेत मिथुनव्रतीनां मुमुक्षु: सर्वात्मना न विसृजेद् बहिरिन्द्रियाणि । एकश्चरन् रहसि चित्तमनन्त ईशे युञ्जीत तद्‍व्रतिषु साधुषु चेत् प्रसङ्ग: ॥ ५१ ॥

sangam tyajeta mithuna-vratinam mumuksuh sarvatmana na visrjed bahir-indriyani ekas caran rahasi cittam ananta ise yunjita tad-vratisu sadhusu cet prasangah

sangam
association
tyajeta
must give up
mithuna-vratinam
of a person engaged in sexual affairs, legal or illegal
mumuksuh
persons who desire liberation
sarva-atmana
in all respects
na
do not
visrjet
employ
bahih-indriyani
external senses
ekah
alone
caran
moving
rahasi
in a secluded place
cittam
the heart
anante ise
fixed at the lotus feet of the unlimited Supreme Personality of Godhead
yunjita
one can engage himself
tat-vratisu
with persons of the same category (desiring liberation from material bondage)
sadhusu
such saintly persons
cet
if
prasangah
one wants association

A person desiring liberation from material bondage must give up the association of persons interested in sex life and should not employ his senses externally (in seeing, hearing, talking, walking and so on). One should always stay in a secluded place, completely fixing his mind at the lotus feet of the unlimited Personality of Godhead, and if one wants any association at all, he should associate with persons similarly engaged.