Perth man Thomas Harman will be released from a Bali jail within days after he was sentenced to three and a half months' prison for stealing a pair of Gucci sunglasses.

The 31-year-old from Nedlands appeared relieved as he accepted his sentence and later grinned broadly as he emerged from Denpasar District Court, saying it had been "a bit of suspense".

Thomas Harman arrives at Denpasar District Court. Credit:Wayan Nambi

"Once again I apologise to the people of Indonesia for the crime," he told reporters.

Harman may only spend another few days in prison, as he has already served most of his term, having been arrested on July 31.