If Matt Cain is not scheduled to pitch next June 13, he might grab manager Bruce Bochy by the ears and demand the ball.

A year to the night after his perfect game, Cain took a no-hitter into the fifth inning Thursday and allowed two hits over 6 2/3 in a 10-0 victory against the Pirates, the same score of his perfecto against the Astros.

When the fourth inning ended with Pittsburgh hitless, fans and some Giants were thinking no-hitter.

"I did," manager Bruce Bochy said. "Guys were discussing what today was. It did cross my mind. He had great stuff. It's a game we certainly needed."

Indeed it was, after the Pirates scored 20 runs in winning the first two games at PNC Park. Cain insisted he thought more about setting a proper tone for the rotation than throwing a no-hitter.

He has to feel good about his progress. If he magically could remove that seven-run inning in St. Louis on June 1, Cain's ERA over his past eight starts would be 2.39. He has allowed six hits and one run over 13 2/3 innings on this 3-3 trip, which ends with three games in Atlanta.

"I feel I'm throwing the ball a lot better," he said. "I'm just trying to eliminate the big inning. I felt I've done a good job of that in some of these years. I've gotten into a bad habit of giving up a big inning. Now it's a matter of putting that in the past and getting guys out."

For the rotation as a whole, Cain said, "We haven't thrown the way we've wanted to this year. We have to take pride in starting to turn that around. We've had glimpses of that at times. We just have to get back into the habit of having more good ones than bad ones."

Words alone cannot make Barry Zito better on the road, or Tim Lincecum win consistently. That is out of Cain's hands. But once every fifth day he can give the Giants an ace-like lift.