Perry, Ducks get tough win over the Sharks in a hostile arena