# as a start change my $line = <$fh>; #to sysread $fh, my $line, 1024;,