my $str = " Perlmonks is the\tcoolest\n \tplace"; $str = join "_", split " ", $str; print $str,$/;