SB 4.28.2

ta ekadā tu rabhasā
 purañjana-purīṁ nṛpa
rurudhur bhauma-bhogāḍhyāṁ
 jarat-pannaga-pālitām
Word for word: 
te — they; ekadā — once upon a time; tu — then; rabhasā — with great force; purañjana-purīm — the city of Purañjana; nṛpa — O King; rurudhuḥ — encircled; bhauma-bhoga-āḍhyām — full of sense enjoyments; jarat — old; pannaga — by the serpent; pālitām — protected.
Translation: 
Once the dangerous soldiers attacked the city of Purañjana with great force. Although the city was full of paraphernalia for sense gratification, it was being protected by the old serpent.
Purport: 

As one’s body engages in sense gratification, it becomes weaker and weaker daily. Finally the vital force becomes so weak that it is herein compared to a weak serpent. The life air has already been compared to the serpent. When the vital force within the body becomes weak, the body itself also becomes weak. At such a time the death symptoms — that is, the dangerous soldiers of death’s superintendent, Yamarāja — begin to attack very severely. According to the Vedic system, before coming to such a stage one should leave home and take sannyāsa to preach the message of God for the duration of life. However, if one sits at home and is served by his beloved wife and children, he certainly becomes weaker and weaker due to sense gratification. When death finally comes, one leaves the body devoid of spiritual assets. At the present time, even the oldest man in the family does not leave home, being attracted by wife, children, money, opulence, dwelling, etc. Thus at the end of life one worries about how his wife will be protected and how she will manage the great family responsibilities. In this way a man usually thinks of his wife before death. According to Bhagavad-gītā (8.6):

yaṁ yaṁ vāpi smaran bhāvaṁ
 tyajaty ante kalevaram
taṁ tam evaiti kaunteya
 sadā tad-bhāva-bhāvitaḥ

“Whatever state of being one remembers when he quits his body, that state he will attain without fail.”

At the end of life, a person thinks of what he has done throughout his whole life; thus he gets another body (dehāntara) according to his thoughts and desires at the end of life. One overly addicted to life at home naturally thinks of his beloved wife at the end of life. Consequently, in the next life he gets the body of a woman, and he also acquires the results of his pious or impious activities. In this chapter the acceptance of a woman’s body by King Purañjana will be thoroughly explained.