Perry, who had a dozen carries, plowed over from short distances twice in the third quarter and then broke free for a 59-yard TD bolt in the fourth quarter.
The win broke a four-game Louisville (6-0, 1-0 Big East) losing streak to the Panthers (2-4, 0-3).
Teddy Bridgewater was 17-for-26 for 304 yards and one touchdown. DeVante Parker caught four passes for 153 yards, including a 78-yard TD play in the third quarter.
Louisville trailed 21-17 at halftime but led 38-21 when the third quarter ended.
Devin Street had 11 catches for 111 yards and a touchdown for the Panthers. Tino Sunseri threw for 287 yards but Pitt was held to 93 yards on the ground and averaged 2.7 yards per carry.
Duggar sisters unveil Christian dating rules in new book
McPhee, Cokas 'working on their marriage' after affair