Hi David Wagner, you wrote:
$str =~ s/\s+/ /g;
This will take one or more white space and replace all found with one space. If you only want a space then s/ +/ /g would be what you want. white space would cover tabs and spaces.
Thanks for the reply. I thought that using + would look for multiple, separate, items and not look at multiple items in one block, which was why I didn't try it. Such as "dog cat dog" to "pup cat pup".
Now I know better! ;)
Cheers! -- Dale
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>