See perlfaq4: "How do I strip blank space from the beginning/end of a string?".
s/^\s+//; # strip white space from the beginning s/\s+$//; # strip white space from the end
In reply to Re: Pulling white space off before/after string?
by bobf
in thread Pulling white space off before/after string?
by ecuguru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |