I'm trying to read the lines on a file with the code below. But the result of this code is to print the same line as lines the document has.
open (file_to_rand, "./files/file07.txt") or die "Could not open file";
foreach $line (<file_to_rand>) {
push(@array,$line);
}
close(file_to_rand);
What is wrong with this code?