http://www.perlmonks.org?node_id=315469


in reply to Efficienty truncating a long string

I think substr is the most efficient.

--
tune