To get an un-buffered stream specify an unbuffered layer (e.g. ":unix") in the open call: open($fh,"<:unix",$path)