Porcupines are tougher than you think, it might be out there a little tired and miffed......... I have stories about shooting porcupines but not tonight.
Take a bath towel and wrap it around the dogs head, twist it up where he is captured pretty good and CANNOT SEE YOU. Needle nose pliers, grap a quill and YANK!!! If he/she doesn't bite you too bad grab another and YANK. If you are detecting a pattern here you are right, there is no slow and easy pulling the quills. They must be yanked out or the dog will be in a tremendous amount of pain, and you WILL get bitten. This is like tying a string around your tooth to the door knob and slamming the door, get it overwith and move on.
If the dog is getting out of control wait a little bit and then try a little later. IF the tongue and gums have quills in them just take him/her to the vet and have the dog put under, that is a war you don't need.
You are in a tough place, especially if it is the first time for this dog and doubly if it is the first time for both of you. It seems a dog will learn that the pulling of the quills is an atrocious evolution it must endure after the second or third encounter with the prickly beast, but the first time they just don't get it. It is also quite hard on the master if your dog is a family member, like mine are, to pull them and put the dog through this. For the sake of the dog please pull at least some of them, they are smart enough to put two and two together and will probably give the porcupine a little space next time. They need the negative of the quills being pulled and it hurting, or next time they will be all over a porcupine again.
I've done this probably 30 times with 10 different dogs, some learn and some just get a few less quills in them.......
EDIT: Missed the part about the vet. If this happens again my post will apply.