Hi, I have string that has one or more spaces. I would like to replace them with a single space. The simple code below replaces the spaces fine, but does not substitute with a space.
$temp = "0 1 2 3 4"; <-> version 1 $temp =~ s/\s+/\s/g; $temp = "0 1 2 3 4"; <-> version 2 $temp =~ s/\s+/s/g; They both end up actually substituting spaces with string s Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/