my $str = "abc def 123 456" ; $str =~ s/(?:\s)\w/_/g ; print $str ; [download]
In reply to is (?: ... ) capturing by jeanluca