he was a peruvian soldier who fought in the war of the pacific