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.
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.
More From This Section
Perera, dropped on 62, ran out of luck when he holed out to Carlos Brathwaite at short fine leg off paceman Ravi Rampaul, much to the disappointment of the home crowd.
Earlier, West Indies opener Johnson Charles top-scored with 83 after the visitors elected to bat.
The West Indies were off to a wobbly start with opener Andre Fletcher edging behind paceman Lasith Malinga (2-43) off the first ball that he faced in the game.
Jermaine Blackwood (9), making his one-day debut, also departed early but Charles steadied the innings in the company of Darren Bravo (21).
Charles raced to his fourth one-day half-century with a paddle swept boundary followed by a massive six over the long-on fence, Ajantha Mendis being the unlucky bowler.
Just when Charles looked set for a bigger score, he was trapped leg before by left-arm spinner Milinda Siriwardana (2-27).
Samuel's dismissal triggered a batting collapse with three more run outs in quick succession that saw the West Indies being bundled out off 37.4 overs.