Give a bad director with an all-star cast an inch?

James Foley’s “Perfect Stranger” is set up as a who-dunnit, quickly devolves into a who-cares-who-dunnit and then reveals itself in the end to be a doesn’t-matter-who-dunnit.

The solution to the puzzle is so arbitrary, so out-of-the-blue, so betraying of our ill-placed attention that we would have been better off staying at home and admiring glossy pictures of Halle Berry and Bruce Willis on the Internet than investing nearly two hours of our lives trying to solve a mystery that, as it turns out, was outside of our ability to solve the entire time.

So, again, I refer you to the Internet or wherever you like to go to see sexy, glamorous photos of movie stars — because if “Perfect Stranger” has anything going for it, it’s the sex appeal of its stars. But why pay $8 when you can admire them online, in all their sexy glory, for free and without the time-wasting plot?

The plot is constructed for audiences who like a mind-twisting jolt at the end of their movies, no matter how ridiculous it is. This movie is all about sensations, without a brain in its head. I read online that three different endings were shot, each with a different person as the real killer. Indeed, several different characters have a motive — and then the filmmakers pick the least likely one, as if to say, “Screw you for caring.”

This is the kind of dreck that actresses usually have to climb through to get to that next role with “Oscar” written all over it. Halle Berry won her Oscar and now seems to be climbing backward.

Berry plays Rowena Price, an undercover journalist whose brilliant methods include revealing to a powerful senator that she’s investigating the sexual behavior between him and his interns. Of course, this gives the senator enough of a heads-up to buy off the appropriate people — something a smart journalist would’ve considered before cornering a rich and powerful man. The story doesn’t run and a furious Rowena quits, which gives her ample free time to investigate the murder of a childhood friend, Grace (Nicki Aycox), who may or may not have been flirting online with another rich and powerful man: Advertising CEO Harrison Hill (Bruce Willis).

Rowena is convinced Harrison was behind the grisly murder (the body was found poisoned and drowned in the river). To get to the bottom of things, she gets a job as an intern at Harrison’s company, headquartered in the kind of New York high-rise that’s full of sexy corporate hallways buzzing with sexy corporate suits, where temptation is only a chic, glass-walled office away.

Is Rowena tempted by Harrison’s advances? She certainly dresses to attract him. But what is Rowena’s angle? Get him in bed and hope he shouts out a confession in a throe of passion? For that matter, is it really necessary for her to doll herself up? If you’re a fan of Halle Berry, your answer might be an enthusiastic “yes.” Could she hack into Harrison’s computer without hacking into his pants? Probably. Would that make for a better movie? Definitely a less sexy one. Of course, once the movie lays its final twist on us, Rowena’s behavior makes a little more sense, but we also realize we’ve all been played for suckers.

No one likes being the sucker.

Rowena gets help from her hacker friend Miles (Giovanni Ribisi), a former co-worker at the newspaper who, like all movie hackers, has magical abilities that allow him to instantaneously access any computer information anywhere at any time and remain sexy while doing so. He harbors a secret crush on Rowena, which complicates things in freakish, absolutely unnecessary ways.

There’s also Harrison’s icy wife, Mrs. Hill (Paula Miranda), who photographs dilated eyes as an artistic hobby. Yes, the chemical used to dilate eyes is the same chemical used to poison Grace.

And then there’s Harrison’s assistant (Daniella Van Graas), a runway-model-turned-guard-dog whose sole purpose in the movie is to cast suspicious looks at Rowena and take long strides in her dominatrix-inspired leather pants.

Could any of these characters have been responsible for Grace’s death? The movie is so scattered, the filmmakers could have easily re-edited it and pinned the crime on anyone. It’s like the screenwriter, Tom Komarnicki, didn’t even bother to figure out the solution himself and just plucked one at random. If the filmmakers don’t give a damn, why should we?

I suppose the point of the movie might be that everyone has secrets and will do anything to cover them up. In the name of honesty, I’ll come right out and say that this movie blows.

” * Burrrrrrrrrppppp * Excuse me. Oh?dear?that tastes like Halle Berries. Ah, ha, ha, ha, ha?” Halle Berry expulses foul gas — among other secrets — in “Perfect Stranger.”