ANAHEIM, Calif. - Although the Anaheim Ducks have been one of the NHL's most dominant teams all season, they hadn't managed to blow out an opponent at home since late October.

With a hat trick from Corey Perry and a sputtering Toronto offence on the other end, the Ducks finally got to enjoy a stress-free third period in Anaheim.

Perry scored three goals and Frederik Andersen made 28 saves for his second career shutout in the Ducks' 4-0 victory over the Maple Leafs on Wednesday night.

Kyle Palmieri also scored in the Ducks' fourth victory in five games, putting them back atop the overall standings alongside Nashville. Anaheim's previous 11 home wins were all one-goal games, but the Ducks routed the Leafs in style.

"We want to be able to put teams away, and I think we did that tonight," said Andersen, who has 44 victories in just 64 career games.

Capping his league-leading third hat trick of the season with an empty-net goal, Perry took over the team lead with 18 goals this season despite missing 15 games with illness and injury.

His second goal was a breakaway set up by a long, beautiful backhand pass from captain Ryan Getzlaf, who had two assists in Anaheim's first win over Toronto in seven tries.

"It's nice to get back on the board," said Perry, who had just one goal in his first five games back from a 10-game absence with a sprained knee. "Since I've been back, it's been tough. I think I was skating a lot better tonight than I had been."

Andersen responded well to the relatively few tests provided by Toronto, and the Danish netminder even got an assist on Perry's empty-netter as the forward completed his eighth career hat trick.

Jonathan Bernier stopped 21 shots for the Maple Leafs, who are 1-3 under new coach Peter Horachek after taking back-to-back shutout losses in Southern California. The Leafs haven't scored with a goalie in the opposite net in 162 minutes and 37 seconds, getting only an empty-net goal in their last eight periods of play.

"We have a lot of firepower, (and) we will find ways to score," Toronto forward James van Riemsdyk said. "If you look at the games, the scoring chances have been pretty even the last couple here. We're pretty happy with our process. We just have to capitalize on our chances."

Toronto has scored just nine goals in six games in 2015, but has improved its defence under Horachek, who took over when Randy Carlyle was fired last week. Carlyle won the 2007 Stanley Cup during seven seasons behind the Ducks bench.

Matt Beleskey and his team-leading 17 goals were a healthy scratch by Ducks coach Bruce Boudreau, but Anaheim's offence kept purring without him. The Ducks have scored 18 goals in their last five games.

In the waning seconds of a two-man advantage in the first period, Palmieri ripped a shot in and out of the net so quickly that play didn't stop. Hampus Lindholm then scored on Bernier shortly after the penalties ended, but video review confirmed Palmieri had scored his third goal in five games.

Perry got his second goal since Nov. 29 when his low shot deflected off Cody Franson's skate and through Bernier's legs.

He scored again in the second when Getzlaf hit him with an exceptional 100-foot backhand pass from the boards. The Leafs thought Perry was offside.

"One goes off my foot, one is a questionable offsides, one is an empty netter, and the other is a 5-on-3," Franson said. "It's frustrating, and we can't let it get the best of us. We're going to give ourselves a lot more chances to win games than we were playing before."

NOTES: David Booth went to the Leafs' dressing room in the third period after checking Sami Vatanen and getting hit in the head by an inadvertent elbow. ... Toronto's Daniel Winnik returned to Anaheim for the first time since the Ducks allowed him to leave as a free agent last summer. ... Carlyle had intended to attend the Ducks' jersey retirement ceremony for Teemu Selanne last Sunday, but was prevented by a death in the family. Carlyle kept a home in Southern California while coaching the Leafs.