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.[1] 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.[2]
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 be a warning signal to nocturnal predators of their unpalatability or a defense function as they can suddenly be turned on, spooking predators with a sudden flash. When handled, the larva may eject a possibly distasteful and corrosive reddish liquid.
The term "railroad worm" is also sometimes applied to the apple maggot.[3]