It was the third bitter final-round major tournament failure for the 52-year-old Perry, who led by three strokes with six holes to play but settled for a second-place tie with Jay Haas.
The 51-year-old Idoki closed with a 6-under 65 to finish at 11 under at Bellerive Country Club and win $385,000 and become the first player to win the tournament on his first attempt since Michael Allen in 2009.
Idoki got a beer shower from fellow Japanese players Joe Ozaki and Kiyoshi Murota after finishing ahead of Perry's final group.
Perry shot a 72, and Haas had a 70. Perry squandered a two-stroke lead with two holes to go in the 2009 Masters and also let victory slip away in the 1996 PGA.
Mark O'Meara was fourth, three strokes back after a 65 including an eagle on No. 17. Murota was another shot behind after a 67.
Perry staggered to the finish line, beginning with a double bogey on No. 13 that dropped him into a tie with Idoki. Another bogey on No. 16 dropped him out of the lead he held or shared since the end of the second round and he bogeyed No. 17 after shooting sideways out of deep rough in trees on No. 17.
Perry lost his lead three-putting from the fringe up against the edge of the rough on No. 13, running it past the cup from about 3 feet before holing out to put him at even par for the day.
He arched his back in disappointment after leaving a long birdie putt just short on No. 14.
Idoki climbed into contention with four birdies and no bogeys on the front nine, and added two more birdies in a flawless finish.
Jim Rutledge closed with a 64 for the best round of the tournament. He tied for sixth with fellow Canadian Rod Spittle, Russ Cochran, Kirk Triplett and Duffy Waldorf. Rutledge had seven birdies, five on the front nine, with no bogeys and no long putts to save par.