Shelby Miller wasn’t perfect like he was for the final 27 hitters he faced last Friday. But, even with modest imperfections, he pitched shutout ball again Wednesday night against the New York Mets.

This time, however, it was for only 5 2/3 innings and not nine.

When Rick Ankiel, a Cardinals pitching phenom more than a decade ahead of Miller, launched a Seth Maness fastball 427 feet for a two-run homer in the seventh inning, Miller’s shutout work was voided. All was not lost for the Cardinals, however, because they pushed across the winning run on a wild pitch in the home seventh, got another on Yadier Molina’s pinch single in the eighth and scored a 4-2 win over the Mets before a paid crowd of 38,143 at Busch Stadium.

The victory was the Cardinals’ third straight over the Mets in a four-game series that concludes this afternoon and was their 12th in their last 14 games. The back-sliding Mets, losers of six straight and with manager Terry Collins incurring the ire of their fans, made two errors, leading directly to two of the Cardinals’ four runs.

In just his fifth big-league game, rookie Maness was credited with his third victory, although he was also saddled with his first blown save.

His win gave Cardinals rookies nine for the season (five by Miller, one by John Gast), compared to seven all last season and four the year before.

The two-pronged late-inning relief team of Trevor Rosenthal and Edward Mujica performed per custom, with Rosenthal posting his 11th hold with a perfect eighth and Mujica his 11th save with a perfect ninth.

Sometimes shutouts are like pleasure cruises, other times like root canals. Miller took a ride on the latter Wednesday, throwing 45 pitches in the first two innings and, with the Mets fouling off a batch of pitches, needing 96 before requiring relief.

The Mets put only six runners on base against Miller, who gave up four hits, walked one and hit one while whiffing six. But Cardinals manager Mike Matheny, mindful that rookie Miller had thrown 113, 106 and 113 pitches in his last three starts, made up his mind to go to lefthander Randy Choate when the occasion arose with two Mets lefthanded hitters coming up, even after Miller had fanned David Wright on a 95 mile an hour fastball for the second out of the sixth.

Choate retired Ike Davis on one pitch to end the inning.

“Those last three games, he went pretty high (in pitch counts),” said Matheny. “So as we got into the 90s, we were really keeping our eyes open and we kind of had our plan put together when the two lefties came up.

“We watch them on a day-to-day basis. If we see something we don’t like, we shorten them up. We shortened Shelby up today.

“If we think (the pitchers) look strong and ... they don’t have any issues physically, we let them go, until they show us differently. You can take any angle on it that you want. There’s going to be people that don’t like how hard we’re riding our starters but usually it’s out of necessity. That’s been the case for a good part of the season when we had trouble kind of figuring out our bullpen.

“(Miller) was laboring today. But I think he found out a lot about himself.”