High levels of ketamine in his blood stream. Last time he was given a treatment by his doctor was a week and a half before his death. It wouldn't have still been in his bloodstream. So he was probably also using recreationally.
Matthew Perry’s autopsy report shows he died of ‘acute effects of ketamine’ | CNN
Friends star Matthew Perry died as a result of “acute effects of ketamine” and subsequent drowning, an autopsy report shows.
amp.cnn.com