"He threw the ball very well," Washington manager Manny Acta said. "Most of the game he was ahead in the count and he showed the good changeup and good breaking ball, especially against the lefties."
Perez departed with a 3-2 lead before Geoff Blum's two-run homer off Chad Cordero in the ninth put Houston on top.
Ryan Zimmerman and Nick Johnson homered for the Nationals. Miguel Tejada connected for Houston for the second consecutive day -- his first two homers this spring.
The 30-year-old Perez agreed to a non-guaranteed, minor league contract Feb. 19 that would pay him $850,000 if he made the major league club. Now, he finds himself in position to possibly be the Nationals' opening-day starter after right-hander John Patterson was released earlier in the day, a surprise move.
"I'm happy with the way I came to this team and (got) the opportunity to pitch in spring training as a starter," Perez said. "If I get the opportunity to (start the opener) in the new stadium, it's good for me."
Patterson, who was Washington's opening-day starter in 2007, missed much of the last two seasons because of right forearm problems, and had surgery in September to repair a nerve problem.
"We spent spring training evaluating him, and we came to the conclusion it was better to give our younger kids a chance to start," Acta said. "It's a rehabilitation-in-progress, and we can't afford to do that every five days."
Patterson, who was slated to pitch Friday against the New York Mets in Port St. Lucie, will be replaced by Matt Chico.
Asked if Perez would be the team's opening-day starter, Acta said: "We haven't decided that yet."
Chris Sampson started for the Astros, pitching five innings. He allowed three runs and four hits. Brian Moehler worked the final two innings for the win.
Zimmerman hit a two-run homer in the first inning, and Johnson's solo shot broke a 2-all tie in the fourth.
Tejada finished with two hits, including an RBI single. He entered with hits in four consecutive at-bats, and stretched the streak to six with the homer and single before grounding out in the sixth inning.
Notes: Washington reassigned 38-year-old second baseman Bret Boone to its minor league camp, saying he would begin the season at Triple-A Columbus. Boone is trying to return to the majors after a two-year hiatus. "I've just come to the conclusion, as well as they have, that I'm not going to be ready in 10 days. I'm going to need more time, almost like a 20-day rehab assignment," Boone said. "And I just need to pursue it and see if it clicks." The Nationals placed right-hander Shawn Hill, outfielder Wily Mo Pena and right-hander Ryan Wagner on the 15-day disabled list. ... Washington catcher Paul Lo Duca will make his spring training debut Friday as he continues his recovery from January knee surgery. The Nationals signed Lo Duca to a one-year, $5 million deal in December.