Railroad worm

A railroad worm is a larva or larviform female adult of a beetle of the genus Phrixothrix in the family Phengodidae, characterized by the possession of two different colors of bioluminescence. It has the appearance of a caterpillar. The eleven pairs of luminescent organs on their second thoracic segment through their ninth abdominal segment can glow yellowish-green, while the pair on their head can glow red; this is due to different luciferases in their bodies, as the reaction substrate, called luciferin, is the same.

The "railroad worm" name arises because these glowing spots along the body resemble the windows of train cars internally illuminated in the night. The light emissions are believed to possibly be a warning signal to nocturnal predators of their unpalatability or a defense function as they can suddenly be turned on spooking preditors with the sudden flash. When handled, larava may eject a possibly distastefull and corrosive reddish liquid.

The term "railroad worm" is also sometimes applied to the apple maggot.