Corey Perry had his second hat trick of the season and the Anaheim Ducks beat the Buffalo Sabres 4-1 on Wednesday night for their sixth straight victory.

Ryan Kesler also scored, and Frederik Andersen made 22 saves, losing a bid for his second consecutive shutout when Tyler Ellis scored off a rebound with 5:04 to play. That ended Buffalo's scoreless streak at 192 minutes, following a 1-0 loss to Florida and 3-0 loss to Boston.

Andersen, who beat St. Louis 3-0 on Sunday night for his first NHL shutout, has been in net for each of the six wins. He has stopped 154 of 162 shots after John Gibson lost the opener in Pittsburgh. Last season, the Ducks won seven straight after a season-opening loss at Colorado.

Perry completed his seventh career hat trick with 1:25 left, scoring into an empty net after beating Michal Neuvirth on a one-timer from the high slot with 2:43 remaining. The 2011 MVP and three-time All-Star has eight goals in his first seven games — including three in the Ducks' opening-night loss.