The porcupine has quills which it can release as it backs itself its enemy. As the quills embed into its potential predator, the animal feels pain and will give up attacking the porcupine.
If you dream of seeing a porcupine, it can mean your enemy may attack you, to save themselves. The manner of attack may be sticking a falsehood to you. The lie will hurt you.
The hedgehog and spiny anteater also have quills. These small animals do not behave like the porcupine, as they don’t release their quills by backing into their enemy. Instead, the hedgehog and spiny anteater curl up their bodies into a ball, with their quills sticking out. When the enemy touches them, they will be hurt by the quills.