Compare perversity in "The Black Cat," "The Imp of the Perverse", and "The Cask of Amontillado."
In "The Imp of Perversity," the narrator describes perversity as being like a man who stands on the edge of some terrible abyss and contemplates falling from the edge to his doom. Note what the narrator says about the danger of doing this:
To indulge for a moment, in any attempt at thought, is to be inevitably lost; for reflection but urges us to forbear, and therefore it is, I say, that we cannot. If there be no friendly arm to check us, or if we fail in a sudden effort to prostrate ourselves backward from the abyss, we plunge, and are destroyed.
The natural perversity of human nature means that entertaining the thought is akin to actually carrying out the action, which is borne out by the narrator's thought of confessing to the murder he has committed, that inevitably leads him to confess.
Arguably, this theme of perversity and confession is something that can be seen in "The Black Cat" and "The Cask of Amontillado." In "The Black Cat," for example, what leads the policemen to discover the narrator's crime is the sound of the black cat entombed behind the wall constructed by the narrator. It is possible to consider the black cat as an external representation of the narrator's conscience, and therefore it is his own self that betrays him. In the same way, in "The Cask of Amontillado," Montresor commits the perfect crime, but clearly now feels, years later, that he must confess it to someone:
For the half of a century no mortal has disturbed them.
It is the same perversity that caused the narrator in "The Imp of Perversity" to confess that no doubt led to the downfall of these two characters, although in slightly different ways and situations. Both are undone by perversity as they feel the need to confess to the crimes they have committed, although for Montresor it is left unclear to whom he is confessing and what prompted this confession.