Perry completed his second hat trick of the season by scoring an empty-net goal with 17.3 seconds remaining.
McElhinney bottled up the high-scoring Avalanche while filling in for All-Star Jonas Hiller, who was scratched due to fatigue. The Ducks have won eight of nine against Colorado.
Peter Budaj made 26 saves for the Avalanche, who have dropped three straight.
Perry made it 2-0 early in the third period when he faked out a Colorado player with a nifty move and lifted a backhand shot over Budaj. He sealed the win with a shot from near center ice into an empty net.
He has 28 goals and 28 assists in 54 games this season.
Adam Foote had Colorado's best scoring chance late while McElhinney was out of position. But the goalie managed to slide over and got a toe on the puck to deflect it and keep the Avalanche off the board.
McElhinney's only other shutout was Nov. 10 against the New York Islanders when he stopped 27 shots.
Colorado pulled Budaj for an extra skater with just over 2 minutes remaining, but still couldn't score.
In the second period, McElhinney stopped Brandon Yip's breakaway attempt with his left leg, and turned aside Matt Duchene's wrist shot from in close with his 6-foot-2 frame.
Perry put the Ducks on the board when he swatted in a rebound on a power play nearly 13:51 in.
The Ducks had a chance at more when they went on a 5-on-3 power play for nearly 1:30 following a hooking call on Ryan Stoa and a high-sticking penalty on Foote, who jawed at the referee and drew an additional 2 minutes for unsportsmanlike conduct.
The two-man advantage started in the first period - the Avs killed off 55 seconds - and spilled over into the second. Colorado withstood the penalties after entering with the NHL's worst penalty-killing unit at home.
The Avalanche killed five of six Anaheim power plays.
Colorado forward David Jones returned to the lineup after missing a game with a shoulder injury, but Ryan O'Reilly missed his seventh straight since he hurt his shoulder sliding headfirst into the boards Jan. 14 at Minnesota.
The Ducks might soon have captain Ryan Getzlaf back in the lineup. He has missed 14 games with facial fractures, the result of being struck in the face with a puck on Dec. 28 at Phoenix. He is expected to return sometime during the Ducks' swing through Western Canada.
Speaking of comebacks, 2003 NHL MVP Peter Forsberg has been feeling better about his progress on the ice as he considers a return to the Avalanche. He skated Saturday before the game with some of the Avs and could soon make a decision on his future,
The Avalanche will practice Sunday before heading out on a four-game trip. Should the 37-year-old Forsberg not sign before the team leaves, Forsberg would be on his own if he wanted to join the squad in Phoenix, Minnesota, Columbus or Nashville.
NOTES: Avs F Peter Mueller has resumed skating again. He has been sidelined by a concussion all season. ... Anaheim was the last Western Conference team to play Colorado this season.