http://www.perlmonks.org?node_id=498105


in reply to Re: how to split string(many words in one line) in a word?
in thread how to split string(many words in one line) in a word?

tmtowtdhw :)
my $string = "The quick brown (it's a slightly reddish brown) fox jump +s over the lazy dog"; my $words = join '', map { ( / / ) ? "\n" : $_ ; } split '', $string ; print "$words" ;