I would be more careful to delimit what you want to keep, i.e., $string =~ s/^\s*(\S.*?\S)\s*$/$1/; Scott
Update: OK, I agree with several other posters indicating that $scalar =~ s/^\s*//; $scalar =~ s/\s*$//; is better and certainly faster.
In reply to Re: Dot star okay, or not?
by scain
in thread Dot star okay, or not?
by Cirollo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |