On Fri, 2007-01-19 at 02:08 -0800, Michael Alipio wrote:
> Hi,
> 
> my $string = "This is a sentence";
> 
> Now, I want to join "is" and "a" by a dash.
> 
> Any idea how do i do that?
> 
> using regexp may not be want I want because the real string contains
> many words, so I have to join several words without using too much
> regexp substitutions.

smells like homework.

Show us what you have tried.

Remember rule 1 is to get something that works and is clear.
Performance is rarely an issue and even then profile working code before
doing anything.

-- 
Ken Foskey
FOSS developer


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to