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: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/