Caenorhabditis elegans concentrates its food, bacteria, by pharyngeal pumping. The rate of pumping is affected by the presence of bacteria. Using a new assay that allows measurement of pumping rate in a population of worms suspended in liquid by measuring their uptake of microscopic iron particles, we have confirmed and quantitated this effect. Furthermore, we demonstrated that starvation stimulates pumping. Worms that had been deprived of bacteria for more than 4 hours pumped in the absence of bacteria under conditions in which well-fed worms did not. Furthermore, starved worms responded to lower amounts of bacteria than did fed worms. The assay was also useful for measuring effects of drugs on pumping. Of about 30 chemicals screened, 5 had clear effects. The neurotransmitter serotonin and the serotonin uptake inhibitor imipramine stimulated pumping, while the serotonin antagonist gramine inhibits. Imipramine stimulation is greatly decreased in cat-1 and cat-4 mutants, which have low levels of serotonin. Muscimol, an agonist for the neurotransmitter GABA, and ivermectin, whose site of action may also be the GABA receptor, both inhibit pumping. Qualitative observations suggested a role for acetylcholine in the regulation of pumping.