Mulligan was inspired by John Boyne’s 2006 Holocaust novel
The Boy in the Striped Pajamas, which he reportedly kept on his desk while writing
Trash. He was also inspired by the motif of “golden tickets” in Roald Dahl’s 1964 children’s novel
Charlie and the Chocolate Factory, in which a young impoverished boy named Charlie gains access to a better life after he finds a golden ticket in a Willy Wonka chocolate bar. Charlie’s “golden ticket” to a better life prompted Mulligan to think about what a “golden ticket” might be for children living as scavengers on a landfill. Like
Trash, Mulligan’s 2015 novel
Liquidator similarly revolves around a plot involving young people who band together to expose injustices they face in their developing country. Another popular novel featuring a young protagonist who wins out despite living in a corrupt society is Vikas Swarup’s 2005
Slumdog Millionaire, in which a young man miraculously wins a fortune on a game show based on knowledge he acquired from a childhood on India’s streets. An earlier example of a book with a social message about childhood poverty is Upton Sinclair’s 1906 novel
The Jungle, which addresses immigrant child labor in a rapidly industrializing early-20th-century Chicago. Like Mulligan, Sinclair advocated for better treatment of society’s most vulnerable children through his writing.