open (FILE, "foo.txt"); my @words = map { split } ; close FILE;