Perera lifted his side to 180 all out, putting on 82 with Sachithra Senanayake and 31 with scoreless last man Lasith Malinga.
The home side appeared to be cruising at 114 for two in reply but contrived to lose their remaining eight wickets for 53 runs, Angelo Mathews taking three for 21.
Sri Lanka openers Tillakaratne Dilshan (three) and Kusal Perera (20) were dismissed in quick succession by Rubel Hossain (two for 37) and Kumar Sangakkara and Ashan Priyanjan also fell cheaply.
Dinesh Chandimal (13) and Kithuruwan Vithanage were run out and debutant Arafat Sunny removed Angelo Mathews for three and Nuwan Kulasekara for a duck as the tourists crumbled.
Thisara Perera had an early escape when, having hit Sunny for four, another big shot at the next ball was fumbled over the rope for six. Two more maximums followed to dent Sunny's still-impressive figures of two for 31.
Senanayake was also dropped after edging Sohag Gazi to Mahmudullah at slip - and the latter paid the price as Senanayake hit him for four and six in the next over.
Amazingly, Thisara Perera again had a shot dropped over the rope for six, Nasir Hossain culpable as the 50-run partnership came up.
Senanayake was dropped again before being bowled by Shakib Al Hasan (two for 29), having made a valuable 30 from 48 balls with two fours and a six.
Thisara Perera took seven runs from the next over and 11 each from the following two but Malinga edged Gazi to keeper Anamul Haque to end the innings, leaving his dominant batting partner unbeaten on 80 from 57 balls with four fours and six sixes.
Bangladesh lost Anamul to the second ball of their innings but near-namesake Mominul Haque quickly got into gear by scooping Kulasekara for four.
He dispatched a Malinga no-ball to the rope to take his team beyond 30 and after 10 overs the Tigers were 49 for one.
Mominul hit back-to-back boundaries off Senanayake, while Shamsur Rahman, previously a largely silent partner, burst into life with a four and a six from successive Malinga deliveries.
Mominul, on 44, carved Thisara Perera straight to point but Shamsur brought up a 43-ball half-century and the team's 100 with two sixes in an over.
He was run out for 62 when his bat stuck in the ground short of the crease, and another run out accounted for Shakib (three).
Senanayake then removed Nasir (eight) and Mahmudullah (nought) in the same over to leave the game in the balance.
Gazi contributed six and Sunny five, meaning number four Mushfiqur Rahim was joined by number 10 Rubel with 20 needed.
Mushfiqur, needing to make the running, edged Mathews to wicketkeeper Sangakkara and Rubel was run out as Sri Lanka closed out victory.