
How do I read line by line of data from a file using perl
# first you need to open a filehandle to the file...
open (DB, "yourfilenamehere");
while(<DB>) { # while there are still lines in your file, (it
will read one at a time)
print $_; # $_ represents each line as it's read, so
do whatever you want to $_
Quote:
}
close(DB); # close your filehandle
# hope this helps!