1 2 3
Text::Trim does what chomp does, but at both ends of the string. WWW: https://metacpan.org/release/Text-Trim