I read this article because the title immediatley caught my attention. I read to find out that reseachers have discovered the reason why caterpillars throw up this green substance is a simple defence mechanism. Just as squids squirt ink, it is a threat to predators.
The substance that the caterpillars throw up has an unpleasant smell to keep predators away when they feel threatened. However, this defense mechanism is known to put a strain on the small caterpillars, slowing their growth rates and harming their reproductive systems. So, the caterpillars won't usually result to this unless they are alone. As there is power numbers, they usually won't throw up when they are in larger groups.
I would reccomend this article to anyone who has an interest in the defense mechanisms of animals, or anyone who is just looking for an interesting read. This article was a strange, but made for an entertaining write-up.
Weird and Wild: Vomiting Caterpillars Explained, D'ell Amore, C., National Geographic, April 2012.