open (FH, "foo.txt") ; while () { chomp; @lines1 = split / /, $_; } close FH; print "@lines1\n";