Porcupine quills can be extraordinarily painful.
The only way to get them out is to grip the quills with pliers as close to the skin as possible and work them out very slowly. The barbs really hang on, and most pets will have a hard time holding still. Most people take their punctured pets to the vet, who will often sedate or anesthetize them before removing the quills. Once the quills are out, wash the area with warm, soapy water. Continue to keep the area clean for several days after the injury.