Hernan Perez hit his fourth homer of the year in a loss