For years, Pretty Little Liars star Troian Bellisario lived with an ugly secret.

The 31-year-old actress, who plays preppy perfectionist Spencer Hastings on the teen drama, recently opened up to Interview magazine about how her own search for excellence manifested in an eating disorder when she was just a teenager.

MORE: These Behind-the-Scenes Photos From Season 1 of ‘PLL’ Will Make You Feel All the Things

While she hasn’t been silent about her struggle with anorexia in the past, Troian has written her first feature film, Feed, based on her experience with the disease. Hear what she had to say about it in the video below:

The brunette beauty also stars in the semi-autobiographical, which follows twins separated by an unexpected tragedy. Troian first spoke out about her past in 2014.

MORE: Remember When the ‘Pretty Little Liars’ Cast Got Matching Tattoos? — See the Pics!

“I started self-harming when I was a junior. I would withhold food or withhold going out with my friends, based on how well I did that day in school,” she explained. “I didn’t know what was right and what was wrong, so I think I created this bizarre system of checks and balances to create order in my world. But it really backfired.”

As an adult, Troian is fighting to bring awareness to eating disorders. “I thought, ‘If I can tell a story that puts the audience in a position to make a similar choice to the one that I made in my young life, maybe I could get them to empathize,'” she tells Interview.

Feed hits theaters on July 18.