open F, $file or die $!; binmode F; while () { # $_ will contain a randomish length of string # which simply depends on where the newline chars fall }