I have strings of this kind
NAME1 NAME2 DEPTNAME POSITION
JONH MILLER ROBERT JIM CS ASST GENERAL MANAGER
I want the output to be name1 name2 and position how can i do it using split/regex/trim/etc and without using CPAN modules?