in reply to Re: chomp and regexp
in thread chomp and regexp

The idiomatic way to trim other whitespace from strings in Perl is in fact with regexen

You can now use

use builtin qw( trim );

However, it's currently experimental.