Nemerteans collect food with their proboscis, which is closely associated with the digestive system. At rest, the proboscis is inside a long tube that may take up a considerable portion of the worm's length, lying just above the gut. It is attached to the posterior end of this tube by a muscle that pulls it back inside after feeding. At the anterior end, the tube opens into a small cavity close to the brain, and then to the outside through a pore at the anterior tip of the animal.