(CNN) CW's "Riverdale" has recruited a special guest to help the show pay tribute to late cast member Luke Perry in its upcoming season premiere.

Shannen Doherty, who co-starred with Perry on "Beverly Hills, 90210," will appear in the episode titled "Chapter Fifty-Eight: In Memoriam," a one-hour episode that will reflect Perry's "enduring legacy and the indelible imprint his character, Fred Andrews, had on 'Riverdale,'" a press release stated.

The casting was announced during the show's panel at San Diego Comic-Con.

"I am deeply honored to pay tribute to Luke on Riverdale," Doherty wrote on instagram. "The care in which this show takes in honoring his memory is beautiful. He is missed. Today. Tomorrow. Forever."

Perry died in March after suffering a stroke. He was 52.

Read More