String::Truncate handles the simple but common problem of long strings and
finite terminal width by eliding or truncating parts of the string from the
left, right, middle or both ends, respectively.

Homepage:
https://metacpan.org/release/String-Truncate
