In an attempt to find more mature roles he decided to leave Beverly Hills 90210 in 1995. In 2004 he appeared in the London production of When Harry Met Sally as Harry alongside Alyson Hannigan as Sally. From 2001 to 2002 he starred in the HBO prison drama Oz in which he performed a full frontal nude scene as Reverend Jeremiah Cloutier.
Perry starred as Dylan McKay on the TV series Beverly Hills 90210 a role he played from 1990–1995 and then from 1998–2000. Perry returned to 90210 in 1998 (this time billed as a permanent "Special Guest Star") and remained with the series until its conclusion in 2000.