Q
uestion
How do I trim spaces from a string in perl?
A
nswer
How to trim string in languages with built-in trim functions. These examples all return a new string and do not alter the original variable.
— Source: Wikipedia (www.wikipedia.org)