Duffy (2-0) was recalled from Class AAA Omaha to make the start, his third of the season with the Royals.
He gave up five hits and struck out seven. Duffy has allowed just two earned runs in 16 1/3 innings this year.
Alex Gordon hit a solo homer to give Kansas City the lead in the third and Perez hit his first blast in the fourth. He added another long ball in the eighth, giving him nine for the season.
The Royals won their fourth in a row, but they remained 7 1/2 games out of the American League's second wild card berth.
Aldrew Alberts (2-2) was charged with the loss after giving up three runs on six hits in seven innings.
Minnesota's run came on a ninth-inning homer by Justin Morneau.
2014: NFL Cheerleaders [PHOTOS]
LeBron James reveals his new Nike shoes