Similarly to infinityandbeyond, you could substitute out the leading and trailing white space like this.
$string =~ s/^\s*(.*?)\s*$/$1/;In reply to Re: How do I remove whitespace at the beginning or end of my string?
by Daddio
in thread How do I remove whitespace at the beginning or end of my string?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |