Angelo Mathews and Perera shared a superb 112-run stand before Junaid struck to send the former back for 91.
(For ball-by-ball commentary, scroll down to the bottom of the page)
Day 1 roundup: Pakistan offspinner Saeed Ajmal picked up two wickets in the last session to restrict Sri Lanka to 220 for 5 at stumps on the first day.
Kumar Sangakkara and Mahela Jayawardene scored 52 and 47 respectively to put respectable total on the board for the visitors.
Angelo Mathews and Prasanna Jayawardene were still at the crease when stumps were called on Thursday.