Jesse Tyler Ferguson recalls Matthew Perry easing his nerves with “Friends” anecdote during his first TV show

The "Modern Family" star said Perry reassured him after watching a taping of "The Class" that wasn't clicking: "There were scenes that weren't going well."

Jesse Tyler Ferguson had an unexpected supporter on the set of his first sitcom: Matthew Perry.

The Modern Family star reflected on shooting a mediocre scene of his short-lived sitcom The Class in the mid-2000s and receiving words of wisdom from the late Friends star. "We were shooting The Class on the same stage that you shot Friends on at Warner Brothers," Ferguson told Lisa Kudrow on a recent episode of his podcast Dinner's on Me. "And Matthew Perry was next door shooting the behind-the-scenes drama Studio 60 and he was dating a cast member of mine on The Class. Matthew was the first one of you I met and became friends with."

Monica Schipper/Getty ; Gregg DeGuire/FilmMagic Jesse Tyler Ferguson and Matthew Perry

Monica Schipper/Getty ; Gregg DeGuire/FilmMagic

Jesse Tyler Ferguson and Matthew Perry

Ferguson noted that the 17 Again star attended a Class shoot that wasn't connecting with the studio audience. "I think Matthew Perry came to one of our tapings one night," Ferguson said. "He was in between scenes and there were scenes that weren't going well. The writers do that thing where if a joke doesn't land, they all huddle and come up with a new blow for the joke and they come over and spit it out to you and you have to memorize it really quickly and if you start to go off on the wrong words or with the wrong punchline, [director] Jimmy Burrows stops you so you don't ruin the joke. It's a high stress situation."

Related: Modern Family siblings Jesse Tyler Ferguson and Julie Bowen both spend Thanksgiving in ER with sons

Ferguson recalled Perry approaching him and easing his nerves. "I think it was a joke for me, actually, and I was having a really hard time nailing it," he said. "Matthew came up to me and said, 'We would have this joke when were shooting Friends: when things didn't work out, we would always say, Oh, you can hear the traffic on Barnum.'"

Related: Courteney Cox honors Friends costar Matthew Perry 1 year after his death

Kudrow jumped in to correct the host. "Barham!" she said, identifying the busy street in Burbank, Calif., that houses a number of TV soundstages and sets.

"Traffic on Barham, that's right," Ferguson confirmed. "Because that's the street that's outside the studio!"

Ferguson suggested that Perry's recollection of striking out jokes on a show as successful as Friends helped him gain confidence in his own show. "It was a very special time just because I was overlapping with these people who were such titans to me."

 Monty Brinton/CBS Photo Archive/Getty  Jesse Tyler Ferguson on 'The Class'

Monty Brinton/CBS Photo Archive/Getty

Jesse Tyler Ferguson on 'The Class'

Ferguson was a series regular on The Class, the one-season CBS sitcom from Friends co-creator David Crane that followed a group of 28-year-olds reuniting 20 years after they shared a third-grade class. The show also starred Jason Ritter, Lizzy Caplan, Heather Goldenhersh, Jon Bernthal, Andrea Anders, Sean Maguire, and Lucy Punch.

Related: Lisa Kudrow is rewatching Friends to remember Matthew Perry

Elsewhere in the episode, Kudrow reflected on watching old episodes of Friends in the wake of Perry's death. "God forbid anybody walk into my house and saw me watching my show, I'd be mortified," she joked. "But after Matthew passed away, there were marathons and I wanted to watch. It felt like part of the remembering, grieving, remembering, all that, and just enjoying, and celebrating."

Sign up for Entertainment Weekly's free daily newsletter to get breaking TV news, exclusive first looks, recaps, reviews, interviews with your favorite stars, and more.

Kudrow said that all of her Friends castmates — Jennifer Aniston, Courteney Cox, David Schwimmer, Matt LeBlanc, and Perry — made her viewing experience endlessly enjoyable. "Boy, I appreciated everybody on it," she said. "Schwimmer’s hilarious. Matt LeBlanc is making me laugh out loud. Jennifer, come on! She's so good. Look what she just did, she's so good. And Courteney, it's like, oh my god, you're hilarious. How did you never get nominated for an Emmy? And Matthew, of course. Genius. At the time he was blowing me away."

Listen to the full conversation between Ferguson and Kudrow above.

Read the original article on Entertainment Weekly