Rubel Hossain, Shakib Al Hasan and Arafat Sunny claimed two wickets each to leave Sri Lanka tottering on 67-8 in the 22nd over after the hosts won the toss and chose to field in the day-night match in Dhaka.
Perera and Sachithra Senanayake ensured Sri Lanka did not fall below 147, their lowest one-day total against Bangladesh, by adding 82 runs for the ninth wicket.
Perera, who helped Sri Lanka record last-ball wins over Bangladesh in two Twenty20 matches last week, hit six sixes and four boundaries in a superb rearguard action.
Senanayake made 30 as Sri Lanka put on 113 valuable runs for the last two wickets after the spectacular collapse by the top order.
The match was reduced to 43-overs-a side from the stipulated 50 due to a wet outfield at the Sher-e-Bangla stadium, which had been drenched by persistent rain over the last two days.
Seamer Rubel Hossain began Sri Lanka's downfall by removing both openers, Tillakaratne Dilshan and Kusal Perera, off successive deliveries s