This time, the Anaheim Ducks only had to dig out of a two-goal hole.

Two days after the Ducks overcame a four-goal deficit to beat the Winnipeg Jets in overtime, they spotted the Edmonton Oilers a two-goal advantage before rallying in the third period for a 3-2 victory at Honda Center on Wednesday night.

Corey Perry, whose last-minute goal Monday sent that game into overtime, scored twice in a 7:57 span of the final period to tie the game, then set up Francois Beauchemin's one-timer from the top of the left circle that beat Viktor Fasth with 1:21 left in regulation.

"Their team was taking away the far side, so I just tried to shoot it as hard as I could," Beauchemin said. "I knew [Perry] was going for a rebound if it was there. Fortunately, it went in. I was pretty happy with that one."

Perry said the Ducks have to play for a full game with the same kind of desperation they showed in the third period.

"We've been a team that's worked hard all year," Perry said. "We have that never-say-die attitude. If we can continue to push and play the right way for a full 60 minutes, we'll be all right."

The Ducks (50-18-8) stretched their lead over the idle San Jose Sharks in the race for first place in the Pacific Division to three points. Anaheim still has a game in hand.

The 50 wins are the most in franchise history.

"The idea of reaching 50 wins is pretty cool, quite frankly," Ducks coach Bruce Boudreau said. "There's only going to be a few teams that do it, and when you're one of them, it's quite an accomplishment. I'm pretty proud of the guys for 50 wins."

Phillip Larsson and Jordan Eberle scored for the Oilers, last in the Western Conference. Fasth, playing for the first time against the team that traded him to Edmonton last month, made 23 saves.

"I think the first period was a little rusty, but I kind of got into the game the longer it went," Fasth said. "But I have to do better for us to win. It was a tough loss.