Lakmal said a key for Sri Lanka's bowlers was that they bowled consistently in the right areas.
In a frenetic start to the day, Sri Lanka scored 94 runs but lost six wickets in 17.4 overs.
Aiden Markram said conditions were difficult for batsmen after 13 wickets fell on the first day of the second Test against Sri Lanka.
Lasith Embuldeniya ended up dislocating his left thumb while attempting a return catch on the opening day of the second Test.
For South Africa it is not just the series on the line, but a stellar home record that has seen them win their last seven Test series at home, dating back to August 2016
Perera hit a career-best 153 not out as he and Vishwa Fernando put on an unbeaten 78 in a last-wicket partnership that enabled Sri Lanka to secure only their second win in 14 Test matches in South Africa.
Sri Lanka, needing 304 to win, were 83 for three at the end of the third day at Kingsmead, 221 runs short of their target.
Sri Lanka, needing 304 to win, were 83 for three at the close, 221 runs short of their target.
Steyn bowled a ten-over spell after lunch in an effort to blow away Sri Lanka's tail.
Sri Lanka were bowled out for 191 and were unable to build on a good first day when their inexperienced bowlers surprised the SA batsmen.