LOS ANGELES, Calif. - If the St. Louis Cardinals end up meeting the Los Angeles Dodgers in the post-season for the third straight year, the seven games they played in June will only add to their confidence against them.

And Jhonny Peralta will be a big reason why.

Peralta homered and singled home the go-ahead run during a three-run eighth inning Sunday night, leading the Cardinals to a 4-2 victory. The shortstop was 11 for 21 with two home runs and eight RBIs during the seven-game season series, which they won 5-2 against the team they knocked out of the playoffs in each of the previous two years.

"Jhonny's a real difference maker. He's been putting together some good at-bats and getting some big RBIs for us," manager Mike Matheny said. "We've been firing him into that cleanup spot, but he's fit wherever we've put him. He's just a guy who's going to sneak up on you like he did tonight. The next thing you know, he's got three hits."

Matt Carpenter drew a leadoff walk from reliever Adam Liberatore, and scored the tying run on a triple down the right-field line by Matt Holliday that skipped past Yasiel Puig — who was playing his second game after missing 39 because of a strained left hamstring.

Holliday's hit came off Juan Nicasio (1-2). Peralta, who leads St. Louis with 34 RBIs, followed with his clutch hit and scored on Mark Reynolds' one-out double to left-centre.

"Last year, Jhonny blew us away with the consistency of his defence, and this year it's his ability to get the big hit," Matheny said. "Coming from the shortstop position, that's pretty impressive. Jhonny is real content with who he is on our club. He's just doing his part, and he's been doing it very well."

Kevin Siegrist (3-0) pitched one inning for the victory, striking out the side in the seventh on 17 pitches. Trevor Rosenthal, the sixth Cardinals pitcher, threw a perfect ninth for his 19th save in 20 attempts.

The NL West-leading Dodgers were coming off a 2-0 victory Saturday night in which Clayton Kershaw held St. Louis to one hit over eight innings. Carpenter was back in the Cardinals' lineup after taking a fastball to the right triceps from Kershaw in the first inning of that game, forcing him out three innings later.

Dodgers right-hander Zack Greinke held the team with baseball's best record to six hits through 6 2/3 innings and struck out eight, giving up his only run in the sixth on Peralta's ninth homer. But the 2009 AL Cy Young Award winner remained winless in six starts — a frustrating stretch in which he's allowed just one run in five of them.

Manager Don Mattingly removed Greinke after 99 pitches with a runner on first and brought in Liberatore, who fanned Kolten Wong to end the inning.

"It makes a lot of sense, what they did," Greinke said. "Liberatore's been amazing getting lefties out all year."

Cardinals right-hander Lance Lynn threw 98 pitches over five innings, allowing two runs and six hits while striking out five. He has yet to give up a home run in 31 career innings against the Dodgers, going 3-1 with a 4.35 ERA and 37 strikeouts in six starts.

Lynn, who was knocked out of a start at Dodger Stadium against Greinke last June because of a blister on his middle finger, got a visit from Matheny and a trainer after the Dodgers opened the fifth with Greinke's second single of the game and a walk to Joc Pederson on the right-hander's 92nd pitch.

Lynn retired the next three batters on flyballs, using six more pitches before Mitch Harris took over to start the seventh.

"Lance just had some forearm tightness," Matheny said. "I noticed something just didn't look right. The trainers inspected where it was, and they weren't concerned. Everything was pointing that it's OK and not that big of a deal, but we wanted to be smart about it. And at almost a hundred pitches, he's about out of the game anyhow."

Jimmy Rollins, who came to the plate in the Dodgers' sixth with just two RBIs in his previous 76 at-bats, was deprived of one by right fielder Jason Heyward — who charged his base hit and threw out Andre Ethier at the plate with the help of a lunging tag by Tony Cruz. Moments earlier, Ethier had stolen his first base of the season.

Puig singled with one out in the first and came all the way around on Justin Turner's two-out double. Turner, starting in the cleanup spot for the third time in four games, made it 2-0 in the third with a two-out single that scored Greinke from second base after the pitcher led off the inning with his first hit.

UP NEXT

Cardinals: RHP John Lackey (4-3) goes into the opener of a three-game series at cozy Coors Field having allowed just two home runs in his last 68 1/3 innings, spanning 284 batters.

Dodgers: RHP Mike Bolsinger (3-1) opposes former Dodger Rubby De La Rosa in the opener of a three-game set against the visiting Diamondbacks, who selected Bolsinger in the 15th round of the 2010 draft.