Srimad Bhagavatam Canto 01, Chapter 12, Text 27

SB 1.12.27

taksakad atmano mrtyum
dvija-putropasarjitat
prapatsyata upasrutya
mukta-sangah padam hareh
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
After hearing about his death, which will be caused by the bite of a snakebird sent by a son of a brahmana, he will get himself freed from all material attachment and surrender unto the Personality of Godhead, taking shelter of Him.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Material attachment and taking shelter of the lotus feet of the Lord go ill together. Material attachment means ignorance of transcendental happiness under the shelter of the Lord. Devotional service to the Lord, while existing in the material world, is a way to practice one’s transcendental relation with the Lord, and when it is matured, one gets completely free from all material attachment and becomes competent to go back home, back to Godhead. Maharaja Pariksit, being especially attached to the Lord from the beginning of his body in the womb of his mother, was continuously under the shelter of the Lord, and the so-called warning of his death within seven days from the date of the curse by the brahmana’s son was a boon to him to enable him to prepare himself to go back home, back to Godhead. Since he was always protected by the Lord, he could have avoided the effect of such a curse by the grace of the Lord, but he did not take such undue advantage for nothing. Rather, he made the best use of a bad bargain. For seven days continuously he heard Srimad-Bhagavatam from the right source, and thus he got shelter at the lotus feet of the Lord by that opportunity.
 
Srimad Bhagavatam Canto 01, Chapter 12, Text 26
Srimad Bhagavatam Canto 01, Chapter 12, Text 28