The Ducks spotted New York leads of 1-0 and 2-1 before Andrew Cogliano forged a 2-2 tie with a goal midway through the second period.
Cam Fowler netted a shorthanded goal and Perry got of his first of the game 31 seconds later during the period's final minute, putting Anaheim ahead for good.
Perry closed out the scoring with a power-play score in the third and Fowler added two assists as the Ducks improved to 11-0-2 to remain the NHL's only team without regulation home loss.
Jonas Hiller earned the win with 35 saves.
Anders Nilsson stopped 26 shots for New York.