#1. The Loophole Crime
This brings us to the Loophole variety of the Perfect Crime, which is when the crime is detected and the authorities are pretty damned sure they know who did it, but they just can't pin the crime on their perp for some technical reason of the law. This is a big, big trope in movies and television, hinging on most viewers' desperate willingness to believe that the legal system is much stupider than it actually is.
"YEAAAAAH LEGAL LOOPHOLES!"
The film Double Jeopardy is probably the best example of this, in which a woman is falsely convicted of killing her husband and is then told that if she now goes and hunts him down and kills him, she can't be charged again. This is, of course, hot nonsense, as every court in the world would consider this two "murders," of which she'd be innocent of the first one and totally, comprehensively guilty of the second.
"Nice try, though."
Still, these stories are based on grains of truth, and criminals getting off on loopholes like this do occasionally show up in the real world. Like the man whose DNA was found at the scene of a jewel heist, only the police couldn't use it to secure a conviction because it belonged to a pair of identical twins. Or there's the possible loophole in the Vicinage Clause, which is a provision in the Sixth Amendment of the Constitution stipulating that juries have to be drawn from the legal district within which the crime occurred. This is a problem if the crime occurred in a legal district where nobody lives, like this one weird part of Idaho where, theoretically at least, someone could commit a felony with impunity.
Idaho Is for Murderers
A Hypothetical Example:
So let's say this hypothetical Internet comedy writer is in the washroom, cramming poison into a mini-quiche, when the door opens, and in comes the victim's cardiologist, his learned eyes quickly diagnosing what's happening.
He's not mad. Just disappointed.
"I hope you're about to eat that yourself," he hoped.
"Derrrr," our hypothetical perfect criminal derrred, noticing that his Perfect Crime was becoming decidedly less perfecter. The doctor leaned in to examine the hypothetical bottle of poison that I, uh, someone else was hypothetically holding.
"Because that old slipping-someone-a-laxative prank is illegal," the doctor said. "And dangerous."
"Laxative?" Our hypothetical hero asked.
"Tegaserod is a powerful laxative. A banned one, too; it causes an increased risk of cardiac problems in people with pre-existing conditions. Were you down behind the old van factory recently?"
"Increased risk, like from 0 to 100 percent?" our perfect murderer hypothetically asked.
"If you're healthy, it's probably not that much of a risk at all," the doctor hypothetically responded. "Though I wouldn't eat i-" he stopped, mouth agape, as I hypothetically ate it.
"Thank you, doctor," our hero hypothetically thanked the doctor. "You've provided the perfect solution." Lunging past the doctor's shocked expression, our perfect criminal strode out into the middle of the party and stood there, both legs spread just a little farther apart than normal, a determined expression on his face.
Frank dickishly rushed up a couple of minutes later.
Not even hypothetically this time. Provably, repeatably, confirmed by multiple independent studies, a dick.
"What the hell are you doing?" he dicked. "My doctor just told me you're planning to shit my party? You have to get out of here. Or at least get off the carpet."
"Nope. This is happening, Frank. Although you might live, your precious carpet will not. And best of all? It will all be just an unfortunate accident. The perfect crime!"
Frank hypothetically lunged back, aghast at my levels of criminal mastermindery.
And then a few seconds later aghast at something else entirely.
Anyway, a few days later, he did end up suing me for several thousand dollars' worth of mental stress, carpet cleaning, and mental cleaning, but that was technically a civil action, not a criminal case, which is basically a loophole, or certainly good enough for me. So there you go: The perfect crime isn't a crime at all.