Is there a built-in function to trim leading and trailing whitespace such that trim(\" hello world \") eq \"hello world\"?
trim(\" hello world \") eq \"hello world\"
Complete howto in the perfaq here: http://learn.perl.org/faq/perlfaq4.html#How-do-I-strip-blank-space-from-the-beginning-end-of-a-string-