open (FILE, "filename.txt") or die "Could not open filename.txt"; # Store the contents of the file in an array, one line per element my @array = ; close FILE; # Print line 10 print $array[10];