Why is this not working?
$data = \"What is the STATUS of your mind right now?\"; $data =~ tr/ +/ /; print $data;
Perl 5.10 has a new character class, \h, the stands for horizontal whitespace which is nice for this sort of thing:
\h
$s =~ s/\h+/ /g;