in reply to Needing to take out 3rd word of sting

You would need to split the string according to what surrounds a word, im assuming in this case it is a space:
@words = split ' ', $string;
The third word would be $words[2] so you'd create the string again without that word:
for($i=0;$i<scalar(@words);$i++){ $string .= $words[$i] unless $i==2; }
Keep the array of words, and when you need to put it back in simply do:
for($i=0;$i<scalar(@words);$i++){ $string .= $words[$i]; }
Hope this helps

Cheers
Sam

Replies are listed 'Best First'.
Re: Needing to take out 3rd word of sting
by Abigail-II (Bishop) on Sep 24, 2003 at 19:37 UTC
    Applying that on the sentence:
    I - king of the world - rule.
    removes the word king. Most people will argue that the third word in the sentence is of.

    Abigail

Re: Re: Needing to take out 3rd word of sting
by seaver (Pilgrim) on Sep 24, 2003 at 19:31 UTC
    Of course, I forget, You need to put the space back in:
    $string .= $words[$i]." "