Chas. Owens wrote: > [trim]
$string =~ s/^[ ]*(.*)[ ]*$/$1/;
That changes the string when not necessary.
I prefer this:
s/\s+$//, s/^\s+// for $string; # rtrim + ltrim
--
Ruud
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
