'We got what we wanted to out of the series' - Hafeez
Pakistan played four young cricketers with fewer than 10 matches' experience, in both matches, and although only opener Sharjeel Khan made a significant contribution, Hafeez said the series had helped shed light on the state of Pakistan's resources, as they look ahead to the World Twenty20 in March. Pakistan have no more official Twenty20s scheduled before the world event.
"We really got what we wanted to out of the series. It's a positive sign that the youngsters are coming in and doing good for Pakistan. We wanted to see where the youngsters are standing so we can make the right combination for the mega-event. It will be easier for the selectors.
"We wanted to inject some of the youngsters and wanted to see them. I think we got the best out of Sharjeel Khan and Bilawal Bhatti. We tried Usman Khan because we didn't have Umar Gul - he's trying really hard to get back into international cricket - and we're also missing Mohammad Irfan, who is unfit."
Seam bowlers Bhatti and Usman had been wayward in the second match,conceding runs at 16 and 13 runs an over respectively, as Sri Lanka's batsmen exploited their inexperience. Hafeez affirmed his belief in their ability, however, and lauded Sharjeel's 25-ball fifty in his third international match.
"Bilawal Bhatti and Usman Khan are youngsters - we should not forget that. But still we believe they are good bowlers and they will learn from this. They just came into international team, and it's not easy.
"Really happy as a captain to see the good performance from the youngster Sharjeel Khan, and also Sohail Tanvir chipped in. Shahid Afridi is also playing well, so those are the positives in the series."
Hafeez also said Pakistan might have posed a more daunting threat to 211 for 3, had his team not lost four wickets to spin for four runs, in the 10th and 11th overs.
"We leaked some runs as a bowling unit. We were thinking to chase 160-170 on this track, but they played very well. If you have to chase you have to play very well and I think we were very much on the plan, but the four wickets in eight balls in the middle order really made a difference."
Pakistan continued to lose wickets and rarely approached the required run-rate during the chase, but Sri Lanka captain Dinesh Chandimal said his team had had nervous moments during Tanvir's brave 63-run ninth wicket stand with Saeed Ajmal. With Ajmal's help, Tanvir blasted Pakistan to within 29 runs of victory with two overs remaining, but Lasith Malinga's 19th over snuffed out the resistance.
"I was a little bit scared when Tanvir was batting really well at the end, because as a bowler you couldn't grip the ball at the end because of the dew - particularly for Malinga," Chandimal said. "But in the end he came in and dismissed Tanvir. Everyone is in good form now, so we are looking forward to the ODI series."
Andrew Fidel Fernando is ESPNcricinfo's Sri Lanka correspondent. He tweets here