Do anti-fungal pills work for pinworm infections?

Doubtful. Pinworms are a type of nematode or simply a worm. Usually quite treatable with a medicine called mebendazole. Some of the antifungals also end in azole such as ketoconazole, but are different types of medication and not likely to be effective. Mebendazole is usually taken as one pill, one dose, one time. Pretty neat really.