The invasion of land by a diverse group of fishlike amphibians during the Middle-Late Devonian was a key event in the history of life. It is obvious that the evolutionary transition from an aquatic to a terrestrial habitat was associated with physiological adaptations such as novel feeding strategies that can not be elucidated with fossils alone. Here we show that two extant vertebrate species, an amphibious fish (the Atlantic mudskipper Periophthalmus barbarus L.), and the common toad (Bufo bufo L.), which both feed on earthworms, have evolved the same modes of prey recognition. In double-choice experiments, both the fish and the tetrapod tried to capture a moving black bar in worm configuration; a vertical (anti-worm) stimulus did not elicit such a response. This finding sheds light on events that may have occurred in semi-aquatic habitats over 370 million years ago.