Perez’s clutch swing came after pinch hitter Jesus Guzman had given San Diego a 4-3 lead with a two-run homer in the top half of the inning.
Toronto won their seventh straight game by downing Colorado 7-3, with Edwin Encarnacion hitting a two-run homer, while J.P. Arencibia and Maicer Izturis added back-to-back shots for the Blue Jays.
It is the longest winning streak for Toronto in five years.
The Rockies have a 0-8 record in interleague games at Toronto.
Cleveland’s Michael Brantley hit a sacrifice fly which capped Cleveland’s three-run eighth inning, rallying the Indians to a 4-3 win over Kansas City.
The New York Mets beat Atlanta 4-3, then 6-1 in a double-header, with young pitcher Matt Harvey and debutant Zack Wheeler both putting in dominant performances from the mound.
Philadelphia’s Cliff Lee struck out nine in eight impressive innings, while Michael Young tied a career high with three doubles as the Phillies downed Washington 4-2.
Arizona’s Paul Goldschmidt hit a leadoff home run in the ninth inning to give the Diamondbacks a 3-2 victory over Miami, ending a four-game skid.
Seattle’s Kendrys Morales hit an RBI single in the 10th inning against his former team, leading the Mariners to a 3-2 win over the Los Angeles Angels.
Minnesota’s Ryan Doumit hit a go-ahead double in the eighth inning, lifting the Twins to a 7-5 win over the Chicago White Sox.
Houston’s Matt Dominguez hit a grand slam and drove in a career-high five runs to back another solid performance by Jordan Lyles as the Astros routed Milwaukee 10-1.