in reply to Dot star okay, or not?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Dot star okay, or not?
by Hofmator (Curate) on Jul 05, 2001 at 20:40 UTC |