Ryan Smyth scored two power play goals for the Kings and Anze Kopitar also scored twice, one with the man advantage on an assist from Smyth.
The Ducks ended the preseason 5-3-0 and the Kings were 4-3-1, including a 4-1 win over Anaheim in Los Angeles.
The Ducks, who were outscored 7-0 in the first period during their seven previous exhibition games, took the lead for good at 2-1 when Ryan pounced on a loose puck in the crease and jammed it past Erik Ersberg at 5:19 of the opening period after Perry was stopped on a wraparound attempt.
Ersberg stopped 12 of 14 shots before he was replaced by Jonathan Bernier at 9:49 of the second. Bernier gave up Ryan's second goal of the game at 12:04 of the period after Getzlaf beat Kings defenseman Alec Martinez to a loose puck behind the net and fed it out in front.
Ryan had a strong preseason last year, but began the regular season in the minors because of salary cap restraints. He was promoted in mid-November and had 31 goals and 57 points in 64 games.
Smyth scored his second goal of the game from a sharp angle to the right of the net at 15:13 of the second, trimming Anaheim's lead to 3-2 while Evgeny Artyukhin was serving an interference penalty. Getzlaf and Kopitar traded power play goals in the third period and Joffrey Lupul got an insurance goal for the Ducks with 2:35 to play.
Artyukhin was off for high-sticking when Kings defenseman Thomas Hickey used Smyth as a screen and beat Jean-Sebastien Giguere with a 55-foot slap shot from the right point at 1:44 of the first. But the goal was disallowed and Smyth was sent off for goaltender interference.
Just 19 seconds later, with the teams skating 4-on-4, Perry opened the scoring with a short wrist shot from a sharp angle that snuck through Ersberg's pads.
The Kings tied it at 3:50 of the first while Anaheim defenseman Luca Sbisa was off for tripping. Michal Handzus had the puck in the right circle and spotted Smyth all alone before feeding him a cross-ice pass that he converted with Giguere way out of position.
Kings defenseman Sean O'Donnell served the third game of a five-game suspension, the result of a match-penalty for attempting to injure Matt Martin of the New York Islanders with a cross-check to the back of the head. O'Donnell also will miss the first two games of the regular season.
The Southern California rivals both open the season at home on Saturday night against Pacific Division foes, with the Kings hosting Phoenix and the Ducks taking on San Jose. They don't begin their six-game season series until Dec. 1 in Anaheim.
It's the 21st straight year that the Kings have ended the exhibition schedule with a record of .500 or better. But they have qualified for the playoffs only nine times during that stretch, getting as far as the Stanley Cup finals in 1993. They haven't played a postseason game since 2002. ... Anaheim center Erik Christensen played for the first time since undergoing shoulder surgery in June.
Copyright by STATS LLC and The Associated Press
Arena: Honda Center Location: Anaheim, California
Attendance: 15,677 (91.3% full)
Corey Perry Assist: James Wisniewski
Ryan Smyth (power play) Assist: Michal Handzus, Ted Purcell
Bobby Ryan Assist: Corey Perry, James Wisniewski
Bobby Ryan Assist: Ryan Getzlaf
Ryan Smyth (power play) Assist: Anze Kopitar, Dustin Brown
Ryan Getzlaf (power play) Assist: Bobby Ryan, Scott Niedermayer
Anze Kopitar (power play) Assist: Ryan Smyth, Dustin Brown