Matthew Perry Matthew Perry

In ABC's midseason comedy Mr. Sunshine, Matthew Perry plays Ben, a self-involved manager of a middling sports arena — or, in Perry's words, a previous version of himself.

"I like to say this character is me five years ago," the actor said Sunday during the show's session at the Television Critics Association fall preview. In the first episode, Ben suffers a crisis of conscience when his would-be girlfriend Alice (Better Off Ted's Andrea Anders) leaves him on his 40th birthday. "I'm very in touch with that selfish guy trying to have a better life."

ABC's fall lineup: Familiar faces anchor 10 new series

Perry was looking for a project to star in and produce when he came across the original script for Mr. Sunshine. The actor said he both identified with and found the comedy in wrestling inner demons and self-absorption, having years ago gotten over a public bout with drug addiction.

"Just pick up any paper from 1996; look at any magazine cover — they say write what you know," the actor said. "That's an interesting road for someone to go on, changing terrible behavior."

There's comedic fodder in exploring "how confused a selfish person would be if he was told the way to a better life is to be a nicer person." A reporter asked if the actor was a nicer person these days. "I'm much nicer," he said.

Matthew Perry comedy lands at ABC

Perry wrote and executive-produced the final pilot with Alex Barnow and Marc Firek (Rules of Engagement). Perry said he plans to stay involved in the writing of the show. "Right now I'm in [the writers' room] all the time. I have some great partners here, but I want to try and stay as close to the creative center of the show as much as possible."

Ben's partners at the Sunshine Arena include his erratic boss Crystal (Allison Janney), former basketball player and Ben's lieutenant Alonzo (James Lesure), his sweet assistant Heather (Portia Doubleday) and Crystal's clueless son Roman (Nate Torrence).

Janney says the role is a departure for the erstwhile C.J. Cregg. "I spent seven years being politically correct on The West Wing and now I get to be completely wrong, sexually inappropriate, have a prescription pill problem... I'm so happy to get to go this far with a character."

Said Perry: "If you have a dysfunctional family working in such a huge venue, if we have cameras on how crazy some of these people are, but they have to get it together because they have 18,000 people showing up every night...  We were just trying to think of a place where the most interesting, insane things can happen."