The actor, 47, was dressed head-to-toe in a costume of leaves for a guest appearance on an upcoming episode of Raising Hope called "The Ghost of Arbor Day."

Playing himself – and the Ghost of Arbor Day Past, Present and Future – the former Beverly Hills, 90210 star pays a visit to Sabrina (Shannon Woodward) when she disapproves of the way the Chance family (Martha Plimpton, Garret Dillahunt) observe the environmentally friendly holiday.

On Tuesday night's episode of FOX's Raising Hope, the pop star made a head-turning guest appearance, trading her blue locks for a teased-to-the-heavens red curly wig. Not to mention a fake mustache.

In the episode, Sabrina (played by Shannon Woodward) gets arrested for kicking a police officer at a protest and she's carted off to jail. There, she encounters Perry's character Rikki, a guard who insists she was Sabrina's one-time frenemy and makes her time in the slammer as uncomfortable as possible.