Pretty orange dots!
The orange and black stripes were so striking that I couldn't just squish the caterpillars outright (even if they were eating all my parsley). I decided that the first order of business was to get some good pictures; I've posted some of the closeups in my caterpillar photoset on Flickr. My favorite is this one:
You just know what that caterpillar is thinking ...
After a bit of research I determined that these were probably black swallowtail caterpillars (Papilio polyxenes; parsleyworm), though most of the pictures of black swallowtail caterpillars I found online show yellow dots, while these caterpillars have distinctly orange dots.
Since swallowtails are cool butterflies, and I'd need to see the adult to identify the species, I decided to pull the caterpillars off the plants and rear them in a cage, feeding them store-bought parsley (I felt bad for my parsley plants). While searching for all the caterpillars I found one that looked like this:
Note the two orange protuberances.
I got very excited, primarily because the structures looked like they may have been eggs laid by a parasite. I immediately decided that I'd keep this caterpillar in a nearly sealed container and watch it carefully, as I hoped I could observe the parasites develop. Images of various parasites flicked through my head as I anticipated what might arise from those little orange structures.
However, when I touched the caterpillar everything changed: the orange structures grew about five-fold in length as the caterpillar reared its head back and slammed the (now very long) orange things into my fingers. I was shocked; my parasite eggs were clearly under the control of the caterpillar. Here's a shot of the structures extended:
It grew horns!
The horns slowly retracted into the body as I let the caterpillar sit on the branch, but as soon as I touched the caterpillar again (or moved the branch it was on), the caterpillar extended them again; if my fingers were close when the caterpillar was touched, it would try to hit my fingers with the orange structures. I'd never seen anything like it. Here's a comparison of how the caterpillars look with and without the structures:
Left: a caterpillar without the structures visible. Right: a caterpillar with the structures mostly retracted (this caterpillar is also wet). It appears that the structures emerge from a point near the junction of the head and thorax. (Note that these are two different caterpillars)
I noticed a very odd (and rather bad) smell coming from the plants after the caterpillars had extended their orange structures, which gave a clue to their function: they appear to be part of a scent organ (briefly described here), which is more technically known as an osmeterium (Bland and Jaques 1978). The structure is apparently common to all swallowtail butterfly larvae (family Papilionidae). Not surprisingly, osmeteria are cited as being used for defense, though I have no idea how they actually function; I'm now very curious.
As a side note, I somewhat confirmed that osmeteria are a scent organ this morning when I accidentally dropped the cage containing all six caterpillars; every caterpillar immediately extended its osmeterium, and boy did it stink.
Bland, R. G., and H. E. Jaques. 1978. How to Know the Insects: 3rd edition. McGraw-Hill, Boston, MA.