On Tue, 2008-11-04 at 16:30 +0100, Rob Coops wrote: > What you want to be doing is this: $temp =~ s/\s+/ /g;
Actually to substitute multiple spaces with just one: $temp =~ s/ +/ /g; Or as some prefer: $temp =~ s{ [ ]+ }{ }gx; Or even: $temp =~ s/\x20+/\x20/g; The reason for not using the first is that sometimes whitespace is ignored (like you normally do in Perl), making it harder to understand. -- Just my 0.00000002 million dollars worth, Shawn The map is not the territory, the dossier is not the person, the model is not reality, and the universe is indifferent to your beliefs. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/