If this final exhibition tuneup was any indication, Cole Hamels will not be distracted by his contract situation.

Hamels pitched four scoreless innings in his final start before the regular season, Placido Polanco hit a three-run home run and the Philadelphia Phillies defeated the Pittsburgh Pirates 7-2 Tuesday night in the last exhibition game.

Hamels gave up three hits, struck out five and retired the final nine batters.

"That's why I have an agent," Hamels said of his contract which expires after this season. "I need to go out and pitch."

Hamels, the Most Valuable Player of the 2008 NLCS and World Series, was 14-9 with a 2.79 ERA last season.

For a barometer, the San Francisco Giants and pitcher Matt Cain recently agreed to a six-year, $127.5 million extension.

"You have teammates," Hamels said smiling, "and they always let me know what's going on."

Manager Charlie Manuel was impressed with Hamels' performance.

"Cole was sharp," Manuel said. "He stayed down in the strike zone. He had good stuff. He's been throwing good all spring."

Polanco provided the bulk of the offense with a blast off Tim Wood into the seats in left field as part of a four-run fifth inning. It was Polanco's first homer of the spring.

Hunter Pence added an RBI double and Shane Victorino had an RBI single for the Phillies, who open the regular season Thursday afternoon at Pittsburgh.

The Pirates took a 2-1 lead in the fifth inning after Robbie Grossman hit an RBI double and Yamaico Navarro followed with a single, scoring Grossman.

Pittsburgh starter James McDonald allowed two hits and one earned run in three innings. He entered the game with an 0-2 record and 9.16 ERA in five previous starts this spring.

McDonald has been especially working hard on refining his slider.

"We watched him all spring develop it," Pirates manager Clint Hurdle said. "It definitely gives him another weapon."

Reliever David Herndon allowed one earned run and struck out two in 1 1/3 innings to pick up the win for the Phillies.

Chris Leroux took the loss for Pittsburgh after giving up two hits and three earned runs in one inning. His ERA ballooned to 10.45.

Despite the loss, the Pirates are eagerly awaiting the regular season. They finished 72-90 last season and sputtered down the stretch.

"We've put a lot of work in," Hurdle said. "We're looking forward to playing ball, to get in a routine and a rhythm. We're ready to play and get home."

NOTES: Following the game, Phillies general manager Ruben Amaro Jr. finalized the 25-man roster. The Phillies will feature 12 pitchers and 13 position players. Infielder Pete Orr had his contract selected while pitcher Raul Valdes, outfielder Scott Podsednik and infielder Hector Luna were optioned to the minor leagues. . The Phillies will open the regular season without second baseman Chase Utley, who is in Arizona to continue rehabilitation on both knees. There is no immediate timetable for his return. . The Pirates optioned pitcher Daniel Moskos to Triple-A Indianapolis on Tuesday. The former first-round draft pick was 1-1 with a 2.96 ERA in 31 appearances for the Pirates last season.