PITTSBURGH (AP) -- St. Louis had 12 hits, yet needed only two to put away the Pittsburgh Pirates. Tom Gorzelanny's wildness gave the Cardinals all the offense they needed on a night their patience was as important as their production.
Brian Barton's two-run single in the fifth inning gave St. Louis the lead on its first hit off the erratic Gorzelanny, and the Cardinals beat the Pirates 6-2 on Thursday night behind Joel Pineiro's seven effective innings.
The Cardinals avoided their first three-game losing streak of the season, putting nine runners on base -- seven on walks from Gorzelanny -- before finally getting a hit.
Gorzelanny walked at least four in each of his last three starts, so the Cardinals talked about the importance of not swinging at bad pitches.
"When the guy doesn't have the control he may normally have, it works to your advantage to get a good pitch. If you don't get it, you're still on base," Barton said. "In my case, I felt if I didn't get something right down the plate, let it go."
The ever-patient Pujols went 2-for-2 and reached base in all five plate appearances, walking twice and getting hit with a pitch. He has reached base in all 23 games and has an on-base percentage of .525.
Gorzelanny (1-3) took a no-hitter and a 1-0 lead into the fifth despite allowing baserunners in all but one inning, only to walk the bases full ahead of Barton's single. Gorzelanny threw only 49 of 94 pitches for strikes, with the wildness forcing him out of the game even though he gave up only the two singles in five innings.
"I couldn't find the zone. ... I don't know what it is," said Gorzelanny, a 14-game winner last season. "The ball's not doing what I want it to do. I'm not happy with what's going on."
Gorzelanny has walked 22 in five starts -- compared to 13 strikeouts -- and has an 8.46 ERA.
"When he gets his pitches over the plate, guys have a tough time hitting it," catcher Ryan Doumit said. "Walks just killed him."
Pineiro (1-2), winning for the first time since beating the New York Mets 3-0 on Sept. 27, was the opposite. He came into the game with an opponents' batting average of .391 and an 8.10 ERA, only to limit Pittsburgh to one run and four hits, striking out six and walking one. He is 3-0 with a 1.74 ERA in four career appearances against the Pirates.
Pineiro didn't have a strikeout while allowing nine runs in 10 innings during his previous two starts this season.
"I don't go out looking for strikeouts, I'm a guy who wants to make them put it in play in the first three or four pitches," he said. "The strikeouts will come when you make good pitches down in the zone 0-and-2 and 1-and-2."
Yadier Molina doubled twice for the Cardinals among his three hits and scored, while Barton had two hits and reached base four times. The three Pirates pitchers gave up 12 hits and walked eight, although the Cardinals stranded 11 runners.
Pineiro stayed in the game despite being struck in the back of the left thigh by Freddy Sanchez's hard-hit ball up the middle in the sixth. The pitcher grabbed the ball in midair after it struck him and, turning sharply while throwing, retired Sanchez at first. Pineiro was checked by a trainer before staying in the game.
"Once it hit my leg and I was able to look up, I just happened to see the ball," Pineiro said. "I grabbed it and turned around and threw it, but the luck was I found the ball right away."
Pirates RF Xavier Nady singled in the ninth to extend his hitting streak to 12 games (17-for-46, .370). ... St. Louis had lost four of five. ... The Pirates lost their seventh in nine games despite winning their previous two. ... The Cardinals are 42-18 in PNC Park. ... The attendance was 9,544, the Pirates' fourth consecutive home game with a crowd of less than 11,000. ... Pirates CF Nate McLouth is 0-for-10 in three games since ending a 19-game hitting streak. ... Pirates 1B Adam LaRoche, 2-for-21 in his previous six games, had an RBI double among two hits.