The caterpillar spins a cocoon and spends its pupal stage inside. Cocoons need to be unravelled to get silk. After growing, the caterpillar which must have turned into a butterfly by undergoing metamorphosis must eat its way out the cocoon. So there is very little possibility of getting silk from such a cocoon. To get silk, the cocoons are put in boiling water during the process of which pupae die.