It would be nice to add a function to the package, which would 'returns
a string that has whitespace removed from the start and the end, and that has each sequence of internal whitespace replaced with a single space'. It could be called as 'simplify' for example.
It's one of those things that you constantly find yourself writing, so why not put it in a module. I might still insist that since it's only a regex, it's not worth it as a module (especially a non-core module). But it supports void context and trimming entire lists. It also can differentiate between leading and trailing whitespace.
Regexp::Common has a whitespace module, but cannot differentiate leading and trailing whitespace.