in reply to Tossing unwanted values from returned list

You can use slices for this purpose in one easy step -
($foo, $bar) = (split ' ', $baz)[2,4];
Update: Oh my, I hit the submit button and found half a dozen answers before me already. I love PM. :)

Replies are listed 'Best First'.