Malinga laced his bowling boots for the final time in the 50-over format and removed openers Tamim Iqbal and Soumya Sarkar with trademark yorkers as Bangladesh' pursuit of 314-8 began its limp towards 223 all out. (CRICKET NEWS)
The visitors faced such a lofty total thanks to Perera's superb 111 off 99 balls, which featured 17 fours and a six, while Kusal Mendis and Angelo Mathews played astute hands for 43 and 48 respectively.
Mathews' long-time colleague Malinga was the man the fans had come to see and he did not disappoint, closing the show to huge acclaim as Thisara Perera held a steepler to halt a breezy 18 from last man Mustafizur Rahman – the great fast bowler departing with 3-38 off 9.4 overs, the pick of Sri Lanka's attack one last time.
Malinga's new ball partner Nuwan Pradeep took 3-51 and Bangladesh's Shafiul Islam was another seamer to prosper (3-62).
Shafiul encouraged Avishka Fernando to chase a ball outside off stump and edge to slip, although that brought Kusal Perera into the fray.
He added a brisk 97 in 73 balls alongside Dimuth Karunaratne before the skipper top-edged a sweep off Mehidy Hasan Miraz to Mustafizur to fall for 36.
Mendis was the next willing accomplice for the centurion as they put on 100 for the third wicket, with Kusal Perera reaching his milestone via a four to the midwicket boundary off Mosaddek Hossain in the 28th over.
Sri Lanka's scoring predictably slowed after the returning Soumya accounted for Kusal Perera, who tamely lobbed a catch to Mustafizur at short fine leg, and Mendis feathered Rubel Hossain behind in the following over.
Mathews used all his experience to guide the hosts beyond 300 before falling to Mustafizur (2-75) in the penultimate over.
Malinga - who is set to continue playing T20 internationals - and Pradeep's efforts at the top of the order had Bangladesh tottering on 39-4 in the 12th over.
Mushfiqur Rahim and Sabbir Rahman combined pleasingly in a stand of 111, although the game was up when the latter holed out to Fernando off Dhananjaya de Silva (2-49) for 60.
Pradeep had Mushfiqur strangled down the leg side for 67 and the man of the hour, Malinga, could enjoy his closing spell with the game in the bag.
The second game of the three-match series takes place in Colombo on Sunday.