Re: substitute all spaces in a sentence except spaces in the first three words

2007-01-19 Thread John W. Krahn
Michael Alipio wrote: > Hi, Hello, > Suppose I have: > > my $sentence = 'the quick brown fox jumps over the lazy dog." > > Now I want it to become: > > 'the quick brown:fox:jumps:over:the lazy dog." One way to do it: $ perl -le' my $sentence = "the quick brown fox jumps over the lazy dog.";

Re: substitute all spaces in a sentence except spaces in the first three words

2007-01-19 Thread Rob Dixon
Michael Alipio wrote: Suppose I have: my $sentence = 'the quick brown fox jumps over the lazy dog." Now I want it to become: 'the quick brown:fox:jumps:over:the lazy dog." That is, to replace the spaces between brown-fox, fox-jumps, jumps-over, over-the, with ":". Should I split the sente