Q. I had a horrible experience last week. I was eating a fish sandwich in a cafeteria when I looked down and noticed some small white worms in the fish. My boyfriend told me they were just part of the fish, but I took them to a biology teacher I know who looked at them under the microscope.

They sure were worms, and I get sick to my stomach just thinking about it. Am I going to become infected with them? Are they harmful? Do I need to do anything about them, or is it too late?

A. Chances are, you're not going to suffer any problems other than an unpleasant memory.

You probably came across a type of worm that infects certain saltwater fish. Known as cod worms or herring worms, they technically belong to the anisakis family of worms.

Once a problem in Japan and other countries where raw fish is popular, fish worms are being seen more and more in America. But if you like sushi, don't give up hope -- all is not lost.

Cod worms can infect various saltwater fish, especially cod, Pacific rockfish (also called Pacific red snapper), whiting, mackerel, haddock, herring and salmon. Raw eel and squid also can carry these worms, which grow up to an inch or so in length. If you eat fish raw or undercooked, you run a very small risk of infection with one of these worms.

If the fish is freshly caught and immediately filleted, however, you won't run into this problem. The reason is that the worms live in the intestines of the fish and would be removed by cleaning. But if you refrigerate a fish whole before cleaning it, the worms will have a chance to bore into the flesh of the fish.

Freezing a fish for 24 to 72 hours at minus 4 degrees Fahrenheit or cooking it to 140 degrees F for at least 10 minutes will kill any living worms. Chances are you had a cod fillet sandwich containing tiny worms that had already been killed by freezing, cooking or both.

Some people have been unfortunate enough to eat fish with live worms in them. In such cases, two kinds of problems can develop. Most of the time, the worm will simply crawl up the esophagus (food tube leading to the stomach), where it is coughed out. In a few people, however, a worm will burrow into the stomach, causing pain, nausea and vomiting, usually within 12 hours of ingestion. In others, it can burrow into the small intestine. There, it produces symptoms resembling appendicitis, usually within a week of eating infected fish. The severe abdominal pain generally leads to surgery, where the worm is then discovered. Because it has been over a week since your unappetizing experience, it's extremely unlikely you have anything to worry about at this point.

Besides cod worms, other types of worms have been found in raw fish. These can sometimes cause illness in humans. For example, last year a New York woman underwent an operation for what doctors thought was appendicitis. It turned out she had a roundworm in her intestines that she got from eating raw fish. Four physicians were infected with a fish tapeworm after eating raw salmon at a party. And a woman developed severe diarrhea stemming from an infection with an intestinal fluke (worm) after eating raw fresh-water fish at a sushi restaurant.

However, sushi lovers will be glad to know that the vast majority of sushi fish is safe. It is selected to avoid the kinds of fish known to frequently harbor worms. In addition, the fish is usually frozen, not only to keep it fresh but also to kill any worms that may be present. In the U.S., most reported cases of cod worm infection involve homemade sushi, rather than sushi eaten at restaurants. Although there have been only a hundred or so reported instances, most authorities believe that cod worm infections are underdiagnosed and underreported.

If you want to cut your chances of running into this problem, I suggest avoiding raw salmon and raw versions of the other fish that cod worms favor, unless you know they've been frozen.

Jay Siwek, a family physician from Georgetown University, practices at the Fort Lincoln Family Medicine Center and Providence Hospital in Northeast Washington.