$line="Bart Lisa Maggie Marge Homer"; @simpsons=split(/\s/, $line); #splits $line and uses a piece of whitespace as a delimiter. #@simpsons now contains ("Bart","","Lisa","Maggie","Marge","Homer"); #notice there is an extra space between Bart and Lisa so we get an empty element in the array there. #lets try a better delimiter that will eliminate that from happening @simpsons=split(/\s+/ $line); #now splits $line on 1 or more whitespace characters #@simpsons now containts ("Bart","Lisa","Maggie","Marge","Homer");