A 23-year-old man has been arrested after apparently riding a 110kmph train in Perth by clinging on at the back.