Help for this page

Select Code to Download


  1. or download this
    $str = "this is a sentence of words and I want the nth one";
    
    $n = 4; # the word we want
    ...
    $word = substr $str, $a, -$a + index $str, $", $a;
    
    print "$word";