Australia needed 18 runs from Perera's final over to win the match, after being set a revised target of 122 from 15 overs following a lengthy rain delay.
The chase came down to four runs from the last ball but Perera produced a dot ball, after conceding consecutive boundaries from his two previous deliveries, to take the match and the series.
However, the match ended with angry scenes as players from both teams clashed verbally, even during the traditional congratulatory handshakes.