I have a problem with a little script that I wrote the script is as follows
# My txt file
$file = "First.txt";
open (FILE, $file);
@LINES=<FILE>; #Read in the entire data file
close(FILE);
srand; #do the random pick up
print "$LINES[int rand(@LINES)]";
this then prints out the a random line from the txt file is there any way that is can read out the whole of the txt file
and print it all to screen rather than just to print out one line out at a time
# My txt file
$file = "First.txt";
open (FILE, $file);
@LINES=<FILE>; #Read in the entire data file
close(FILE);
srand; #do the random pick up
print "$LINES[int rand(@LINES)]";
this then prints out the a random line from the txt file is there any way that is can read out the whole of the txt file
and print it all to screen rather than just to print out one line out at a time