Recently Pakistan clean swept Sri Lanka in 5 ODI match series and also won the first T-20 match.
Driven by a hat-trick, Ashraf derailed the Sri Lankan innings with 3 for 16 in his three overs, thus becoming the first Pakistani to record a hat-trick in T20I cricket.
Before this Pakistan has beaten England to gain the Number two spot.
Pakistan beat Sri Lanka by two wickets in a sensational last over finish in the second Twenty20 global in Abu Dhabi on Friday, taking an unassailable 2-0 lead in the three-match series.
Sri Lanka coach Nic Pothas urged the tourists to show more character after they lost the first match on Thursday, but they capitulated from 106-1 to 124-9 a day later after a half-century from Danushka Gunathilaka (51) at the top of the order.
Not only Sri Lanka will be led by a new Captain, replacing Upul Tharanga who refused to visit Pakistan for final T20 at Gaddafi Stadium in Lahore on October 29 but also 11 players of 16-member Sri Lankan squad have yet to begin their T20 global career. But Shadab and Hasan Ali did the needful to deny Sri Lanka a memorable win.
Skipper Sarfraz Ahmed (28) and Mohammad Hafeez (19) added 39 for the fifth wicket to bring Pakistan within 31 runs of victory.
"As a captain, I'm really proud of them and a win was not too far away", said Perera.
As Ashraf, the medium pacer, became only the sixth bowler to register a T20I hat-trick, he spoiled Sri Lanka's chances of posting a challenging total.
Sri Lanka, sent into bat for the second match in succession, got off to a solid start with openers Gunathilaka and Dilshan Munaweear put on 43 for the opening wicket.
But Sadeera, Seekkuge Prasanna and Perera were run outs before Ashraf came into his own.