Perera added 156 runs for the second-wicket partnership with Thirimanne.
Perera, 25, hit four sixes and six fours in his 92-ball knock before being dismissed for 99 in the rain-curtailed day-night game at the Premadasa stadium in Colombo.
The victory helped the hosts take an unbeatable 2-0 lead in the three-match series after having won the opener by one wicket at the same venue on Sunday.
Perera, who was troubled by cramps, shared a 156-run partnership for the second wicket with Lahiru Thirimanne who chipped in with an unbeaten 81.
Set a revised Duckworth-Lewis target of 225 in 38 overs after rain interrupted play for more than three hours, Sri Lanka cantered to the emphatic win with nine balls to spare.
The third and final one-dayer will be played on Saturday followed by two Twenty20 games. Sri Lanka swept the preceding Test series 2-0.