ST. LOUIS -- Matt Carpenter welcomes it when teams bring in a left-handed reliever to face him. In fact, he almost thrives on it.
The left-handed Carpenter hit a two-run home run off lefty Wesley Wright (0-3) and Matt Holliday drove in two with a two-out hit to help the St. Louis Cardinals beat the Houston Astros 5-4 Wednesday night.
"I've always felt, my whole career, even as an amateur, like I see lefties pretty well," said Carpenter, who earned his first All-Star Game selection this year. "I try to take the same approach and just get a good pitch to hit and try to put a good swing on it."
Carpenter's batting average is nearly 40 points lower against lefties (.294 versus .333 against right-handers), but four of his nine home runs this season have come against southpaws.
His homer in the seventh gave the win to Seth Maness (5-1). Tony Cruz got hit by starter Jordan Lyles' first pitch of the inning and one out later Carpenter put a 2-1 pitch into the right-field stands.
"I think he takes it personal that they come in thinking that's something he'd have more of a weakness with," manager Mike Matheny said. "There's some guys who are just highly motivated and I think that's one of the things he takes a lot pride in, is putting together a tough at-bat so they just don't start firing left-handers against us."
Maness gave up two hits and a run in two innings of relief. He struck out three.
Edward Mujica earned his 25th save in 26 tries. He has appeared in six consecutive games, going 1-1 with four saves.
Lyles gave up four runs and six hits in 6 1/3 innings. He struck out two and walked two. Lyles hasn't won a game since beating Milwaukee on June 18.
Astros manager Bo Porter said he knew his starter would only face the first two batters in the seventh.
"That was a totally left-on-left decision and you look at the stress of the innings in which he had gotten to that point," Porter said. "I sent him back out there with the notion he was going to face Cruz, he was going to face the pinch hitter (Yadier Molina) and Wesley was going to be ready for Carpenter."
Cardinals starter Shelby Miller needed 94 pitches to labor through five innings. He gave up three earned runs, walked five and struck out five. He had a total of six full counts, coming back to strike out Jason Castro and getting Brett Wallace to ground out.
"It was a rough one for me," Miller said. "I didn't have anything going for me. I couldn't throw strikes or much of anything. I just tried to keep the team in it as much as I could with what I had. It wasn't much, but five innings, three runs and the offense picks you up.
"These guys never cease to amaze me when they go out there and do the things that they do."
Wallace, who had four hits and scored a run, drove in Jose Altuve in the seventh to give Houston a 4-3 lead.
Holliday's single in the fifth tied the score at 3-3. His slap to right field drove in Cruz and Shane Robinson, who had a pinch hit single in place of Miller.
The Cardinals swept their five-game homestand with three victories over Miami before taking both against Houston. The home sweep comes on the heels of a 7-11 stretch that included three wins over the Chicago Cubs, who host the Cardinals in a four-game set starting Thursday.
"This is a huge five-game stretch for us to win, come out here and win all these games at home, to get on a roll right before the All-Star break," Carpenter said. "Hopefully we can continue it in Chicago."
Chris Carter hit his 18th home run just over the right field fence to open the second. Houston then used a Wallace single, two walks and an error for a 2-0 lead. The Astros took a 3-1 lead after Castro hit a ground rule double and J.D. Martinez drove him in with a single in the fifth.
Cardinals C Cruz got his third start in the past four games in place of All-Star catcher and league-leading batter Yadier Molina, who is nursing a sore right knee. He's gone 3 of 9 in that span. ... Molina struck out as a pinch hitter in the seventh. ... Wallace, former first-round pick of the Cardinals, is 7 for 18 with five RBIs and four runs in four games this season against St. Louis. . Porter said after the game the Astros will call up one of their top prospects, 23-year-old right-hander Jarred Cosart, to make his major league debut Friday at Tampa Bay. Dallas Keuchel will be pushed to Saturday with Erik Bedard starting on Sunday. . The Astros have lost 13 of their past 15 games against their former NL Central division rivals.