open (FH, "foo.txt"); my @words = map { split } ; close FH; print "@words\n";