in reply to reading 100 line at a one time

Another way to read whole file into an array is:
open FILE, "c:/test.txt"; my @arr = <FILE>; close FILE;