Boston gets best of Canes late in 5-3 win