After declaring on their overnight total of 247 for six to set Zimbabwe 412 for victory on the final day, Sri Lanka were under threat of being held to a draw as Graeme Cremer once again proved to be the thorn in their side with his stubborn 43.
But Herath finished with figures of 3 for 38, which included the key wickets of Cremer and Sean Williams, and Perera took 3 for 34 as Zimbabwe were bowled out for 186 with just 7.3 overs left in the game.
Even after Chari was bowled in Lahiru Kumara's first over to depart for 10, Mawoyo found solid support from Hamilton Masakadza as the pair batted for almost an hour.
However a poor umpiring decision changed the complexion of the game, as Mawoyo was given out lbw to Perera by umpire Simon Fry, with replays showing that the ball was comfortably missing leg stump.
Also Read
"We were really happy with the start we had, but then when we started to lose a few wickets we panicked," said Cremer.
Perera trapped Craig Ervine lbw in his next over, and in the following over Lakmal dismissed both Masakadza, for 20, and Malcolm Waller.
With another decision going against Zimbabwe after lunch, when Peter Moor was given out lbw by umpire Ian Gould to a Kumara delivery that was bouncing over the stumps, the end was in sight for the hosts.
Needing four wickets in the final session to wrap the game up, Herath stepped forward to have Williams caught at slip for 40 before trapping Donald Tiripano lbw.
Yet Cremer fought on, taking his innings towards the three-hour mark and his score to 43.
With less than 10 overs to go, the Zimbabwe captain had a rush of blood to the head and was stumped off the bowling of Herath.
"I blame myself for losing this game," said the man of the match. "If I was there then at least if Carl (Mumba) or Chris (Mpofu) had got out then I would have felt a lot better about myself, but I think my wicket was the turning point in us losing this game."
"I tell you a lot of credit goes to the fast bowlers," said Herath. "There was not much assistance for the spinners and the Zimbabweans batted well. But the fast bowlers played their heart out and gave 100%.
Disclaimer: No Business Standard Journalist was involved in creation of this content