I want to get everything in a sentence after the second space. I am doing this by splitting and joining. I want to join everything after the second element but I'm not sure how to do this. The sentence can have several words so I don't want to hardcode the end range.
$sentence = "a b c and d";
@array = split(" ", $sentence);
$str = join(' ',$array[???]);
I want an output that looks like:
c and d