Hosmer, Perez homer during explosive eighth inning