in reply to Re: help me ---regarding string
in thread help me ---regarding string

Although perlprint asked only about blanks and letters, sometimes punctuation creeps in. The third alternative handles all non-blanks and avoids capturing:
>perl -wMstrict -le "my $string = 'W h a t H o ? N o G o .'; (my $sqz1 = $string) =~ s{ [ ] \b }{}xmsg; print qq{'$sqz1'}; (my $sqz2 = $string) =~ s{ \b [ ] }{}xmsg; print qq{'$sqz2'}; (my $sqz3 = $string) =~ s{ [ ] (?![ ]) }{}xmsg; print qq{'$sqz3'}; " 'What Ho ? No Go .' 'What Ho? No Go.' 'What Ho? No Go.'
Update:  (?![ ]) vice  (?=\S) in third example.